feat: redirect prod homepage to blazity domain

This commit is contained in:
Bart Stefanski 2023-09-25 15:00:12 +02:00
parent e39091915c
commit efb4c52dce

View file

@ -1,3 +1,4 @@
import { GetServerSidePropsContext } from "next"
import Head from "next/head" import Head from "next/head"
import { Button } from "components/Button/Button" import { Button } from "components/Button/Button"
import { LP_GRID_ITEMS } from "../lp-items" import { LP_GRID_ITEMS } from "../lp-items"
@ -57,3 +58,18 @@ export default function Web() {
</> </>
) )
} }
export async function getServerSideProps({ req, res }: GetServerSidePropsContext) {
if (req.url?.includes("next-enterprise.vercel.app")) {
return {
redirect: {
destination: "https://blazity.com/open-source/nextjs-enterprise-boilerplate",
permanent: true,
},
}
}
return {
props: {},
}
}