From e69190abb09661caa19fa3905a0d8f3b7e72648b Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 13 Jul 2020 20:59:52 +0800 Subject: Move front end to a submodule. --- Timeline/ClientApp/src/app/App.tsx | 84 -------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 Timeline/ClientApp/src/app/App.tsx (limited to 'Timeline/ClientApp/src/app/App.tsx') diff --git a/Timeline/ClientApp/src/app/App.tsx b/Timeline/ClientApp/src/app/App.tsx deleted file mode 100644 index 83ea4ea5..00000000 --- a/Timeline/ClientApp/src/app/App.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import React from 'react'; -import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; -import { hot } from 'react-hot-loader/root'; - -import AppBar from './common/AppBar'; -import LoadingPage from './common/LoadingPage'; -import Home from './home/Home'; -import Login from './user/Login'; -import Settings from './settings/Settings'; -import About from './about/About'; -import User from './user/User'; -import TimelinePage from './timeline/TimelinePage'; -import AlertHost from './common/AlertHost'; - -import { checkUserLoginState, useOptionalUser } from './data/user'; - -const NoMatch: React.FC = () => { - return ( - <> - -
-
Ah-oh, 404!
- - ); -}; - -const LazyAdmin = React.lazy(() => - import(/* webpackChunkName: "admin" */ './admin/Admin') -); - -const App: React.FC = () => { - const user = useOptionalUser(); - - React.useEffect(() => { - void checkUserLoginState(); - }, []); - - let body; - if (user === undefined) { - body = ; - } else { - body = ( - - - - - - - - - - - - - - - - - - - - - {user && user.administrator && ( - - - - )} - - - - - - ); - } - - return ( - }> - {body} - - - ); -}; - -export default hot(App); -- cgit v1.2.3