diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 58333fc..1b91e60 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -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
LMFAO
;
+}
+
+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 (
-
- LMFAO
-
- )
+ return {
+ redirect: {
+ destination: "/home",
+ permanent: false,
+ },
+ };
}
-export default Index
\ No newline at end of file
+export default Index;
diff --git a/tsconfig.json b/tsconfig.json
index b1a52cf..59d55ef 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -20,6 +20,6 @@
"incremental": true,
"noUncheckedIndexedAccess": true
},
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "src/hooks/_middlware.js"],
"exclude": ["node_modules"]
}