index page redirection

This commit is contained in:
sriram veeraghanta 2023-04-05 14:40:36 -04:00
parent d45979eacb
commit 39f151ce73

View File

@ -1,13 +1,15 @@
// lib import { useEffect } from "react";
import { homePageRedirect } from "lib/auth"; import { homePageRedirect } from "lib/auth";
// types // types
import type { NextPage, NextPageContext } from "next"; import type { NextPage, NextPageContext } from "next";
import { useRouter } from "next/router";
const Home: NextPage = () => null; const Home: NextPage = () => {
const router = useRouter();
export const getServerSideProps = (ctx: NextPageContext) => { useEffect(() => {
const cookies = ctx.req?.headers.cookie; router.push("/onboarding");
return homePageRedirect(cookies); }, []);
return <>loading</>;
}; };
export default Home; export default Home;