forked from github/plane
index page redirection
This commit is contained in:
parent
d45979eacb
commit
39f151ce73
@ -1,13 +1,15 @@
|
||||
// lib
|
||||
import { useEffect } from "react";
|
||||
import { homePageRedirect } from "lib/auth";
|
||||
// types
|
||||
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) => {
|
||||
const cookies = ctx.req?.headers.cookie;
|
||||
return homePageRedirect(cookies);
|
||||
useEffect(() => {
|
||||
router.push("/onboarding");
|
||||
}, []);
|
||||
return <>loading</>;
|
||||
};
|
||||
|
||||
export default Home;
|
||||
|
Loading…
Reference in New Issue
Block a user