mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
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