diff options
author | crupest <crupest@outlook.com> | 2020-06-12 15:42:08 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-12 15:42:08 +0800 |
commit | 3b7ebc77d9abd0bcdbc78788623b3dd019e8ea80 (patch) | |
tree | d36955309e84a219f50f14ce27a5ea5c263f7bbb /Timeline/ClientApp/src/app/App.tsx | |
parent | 41825ea3d063ebf5a1dca562e4bd048d647409e1 (diff) | |
download | timeline-3b7ebc77d9abd0bcdbc78788623b3dd019e8ea80.tar.gz timeline-3b7ebc77d9abd0bcdbc78788623b3dd019e8ea80.tar.bz2 timeline-3b7ebc77d9abd0bcdbc78788623b3dd019e8ea80.zip |
feat(front): 2 enhance on app upgrade.
1. Other pages show alert to refresh when a page confirm upgrade.
2. Upgrade success alert.
Diffstat (limited to 'Timeline/ClientApp/src/app/App.tsx')
-rw-r--r-- | Timeline/ClientApp/src/app/App.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Timeline/ClientApp/src/app/App.tsx b/Timeline/ClientApp/src/app/App.tsx index befa2a9c..83ea4ea5 100644 --- a/Timeline/ClientApp/src/app/App.tsx +++ b/Timeline/ClientApp/src/app/App.tsx @@ -40,7 +40,7 @@ const App: React.FC = () => { body = <LoadingPage />; } else { body = ( - <React.Suspense fallback={<LoadingPage />}> + <Router> <Switch> <Route exact path="/"> <Home /> @@ -69,15 +69,15 @@ const App: React.FC = () => { <NoMatch /> </Route> </Switch> - </React.Suspense> + </Router> ); } return ( - <> - <Router>{body}</Router> + <React.Suspense fallback={<LoadingPage />}> + {body} <AlertHost /> - </> + </React.Suspense> ); }; |