-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
import React from 'react' | ||
import {useSession} from "next-auth/react" | ||
import { useRouter } from 'next/router' | ||
import React, { useEffect } from "react"; | ||
import { useSession } from "next-auth/react"; | ||
import { useRouter } from "next/router"; | ||
import { NextPageContext } from "next"; | ||
|
||
function Index() { | ||
const session = useSession() | ||
const router = useRouter() | ||
return <div>LMFAO</div>; | ||
} | ||
|
||
export async function getServerSideProps(context: NextPageContext) { | ||
// TODO: redirect to website if user is not logged in | ||
|
||
// TODO: @yxshv pls lol | ||
// If user is logged in, redirect to /home. | ||
// otherwise, redirect to what-is.lmfao.tech | ||
return ( | ||
<div> | ||
LMFAO | ||
</div> | ||
) | ||
return { | ||
redirect: { | ||
destination: "/home", | ||
permanent: false, | ||
}, | ||
}; | ||
} | ||
|
||
export default Index | ||
export default Index; |
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