[WEB-1404] chore: space app infinite loader and scroll fix. (#4559)
* [WEB-1404] chore: space app infinite loader and scroll fix. * chore: revert back `isLoading` initail state to `true` in user store.
This commit is contained in:
parent
c9e6ead3af
commit
780caf59a0
6 changed files with 16 additions and 25 deletions
|
|
@ -1,5 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { observer } from "mobx-react-lite";
|
||||
// components
|
||||
import { UserLoggedIn } from "@/components/account";
|
||||
import { LogoSpinner } from "@/components/common";
|
||||
|
|
@ -7,7 +8,7 @@ import { AuthView } from "@/components/views";
|
|||
// hooks
|
||||
import { useUser } from "@/hooks/store";
|
||||
|
||||
export default function HomePage() {
|
||||
const HomePage = observer(() => {
|
||||
const { data: currentUser, isAuthenticated, isLoading } = useUser();
|
||||
|
||||
if (isLoading) return <LogoSpinner />;
|
||||
|
|
@ -15,4 +16,6 @@ export default function HomePage() {
|
|||
if (currentUser && isAuthenticated) return <UserLoggedIn />;
|
||||
|
||||
return <AuthView />;
|
||||
}
|
||||
});
|
||||
|
||||
export default HomePage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue