diff --git a/.gitignore b/.gitignore index f64aa1b..0b93d06 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ client/.env.production.local client/npm-debug.log* client/yarn-debug.log* client/yarn-error.log* + +client/src/authentication/config.json diff --git a/client/src/App.tsx b/client/src/App.tsx index 88220e3..f71b386 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,8 +1,19 @@ import React, { FC } from "react"; import Layout from "./pages/Layout"; +import { useAuth0 } from "./authentication/auth0"; const App: FC = () => { - return ; + const { loading } = useAuth0(); + + if (loading) { + return
Loading...
; + } + + return ( +
+ +
+ ); }; export default App; diff --git a/client/src/index.jsx b/client/src/index.jsx new file mode 100644 index 0000000..6668661 --- /dev/null +++ b/client/src/index.jsx @@ -0,0 +1,29 @@ +import React from "react"; +import ReactDOM from "react-dom"; +import App from "./App"; +import * as serviceWorker from "./serviceWorker"; +import { Auth0Provider } from "./authentication/auth0"; +import config from "./authentication/config.json"; +import history from "./utils/history"; + +const onRedirectCallback = appState => { + history.push( + appState && appState.targetUrl + ? appState.targetUrl + : window.location.pathname + ); +}; + +ReactDOM.render( + + + , + document.getElementById("root") +); + +serviceWorker.unregister(); diff --git a/client/src/pages/Layout.tsx b/client/src/pages/Layout.tsx index 7cc1b3f..cf9a792 100644 --- a/client/src/pages/Layout.tsx +++ b/client/src/pages/Layout.tsx @@ -1,11 +1,14 @@ import React, { FC } from "react"; import { AppRouter } from "../utils/router"; +import { NavBar } from "../components/Navbar"; const Layout: FC = () => { return ( <> - {/* - */} +
+ +
+ {/* */} {/*