[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:
Prateek Shourya 2024-05-23 14:27:16 +05:30 committed by GitHub
parent c9e6ead3af
commit 780caf59a0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 16 additions and 25 deletions

View file

@ -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;