From c8bd19aacf9059f740df4f6fa9890127c20c1f6d Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 13 Feb 2021 21:23:30 +0800 Subject: ... --- FrontEnd/src/app/App.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'FrontEnd/src/app/App.tsx') diff --git a/FrontEnd/src/app/App.tsx b/FrontEnd/src/app/App.tsx index 0a7513e4..fb57bd1e 100644 --- a/FrontEnd/src/app/App.tsx +++ b/FrontEnd/src/app/App.tsx @@ -12,7 +12,6 @@ import TimelinePage from "./views/timeline"; import Search from "./views/search"; import AlertHost from "./views/common/alert/AlertHost"; -import { dataStorage } from "./services/common"; import { userService, useRawUser } from "./services/user"; const NoMatch: React.FC = () => { @@ -24,16 +23,13 @@ const LazyAdmin = React.lazy( ); const App: React.FC = () => { - const [loading, setLoading] = React.useState(true); - const user = useRawUser(); React.useEffect(() => { void userService.checkLoginState(); - void dataStorage.ready().then(() => setLoading(false)); }, []); - if (user === undefined || loading) { + if (user === undefined) { return ; } else { return ( -- cgit v1.2.3