-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reworking system start/app login flow. changes made ot the workflow.
- Loading branch information
1 parent
803f16e
commit 7dfbb8b
Showing
8 changed files
with
64 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
export default function Page() { | ||
return <>Accidentally reached root page, yikes :/</>; | ||
} | ||
"use client"; | ||
|
||
import {useSession} from "next-auth/react"; | ||
import {redirect} from "next/navigation"; | ||
import {Stack} from "@mui/joy"; | ||
import CircularProgress from "@mui/joy/CircularProgress"; | ||
import Typography from "@mui/joy/Typography"; | ||
|
||
export default function HomePage() { | ||
const {data: _session, status} = useSession(); | ||
|
||
if (status === "authenticated") redirect('/dashboard'); | ||
else if (status === "unauthenticated") redirect('/login'); | ||
else return <Stack direction={"column"} sx={{ alignItems: 'center'}}> | ||
<CircularProgress size={"lg"} variant={"soft"} color={'primary'} /> | ||
<Typography color={"warning"} level={"title-md"}>Loading...</Typography> | ||
</Stack> | ||
} |
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
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