-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information
1 parent
c9e6ead
commit 780caf5
Showing
6 changed files
with
16 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,21 @@ | ||
"use client"; | ||
|
||
import { observer } from "mobx-react-lite"; | ||
// components | ||
import { UserLoggedIn } from "@/components/account"; | ||
import { LogoSpinner } from "@/components/common"; | ||
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 />; | ||
|
||
if (currentUser && isAuthenticated) return <UserLoggedIn />; | ||
|
||
return <AuthView />; | ||
} | ||
}); | ||
|
||
export default HomePage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters