Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import { sessionCookieName } from "appConstants"; import { GetServerSideProps } from "next"; import { dashboardRoute, landingRoute } from "routes"; export const getServerSideProps: GetServerSideProps = async (context) => { return { redirect: { destination: context.req.cookies[sessionCookieName] ? dashboardRoute : landingRoute, permanent: true, }, }; }; export default function HomePage() { return undefined; } |