2
0
Files

14 lines
408 B
TypeScript
Raw Permalink Normal View History

2024-08-09 00:39:27 +02:00
import type { GetServerSidePropsContext } from "next";
export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
const notFound = { notFound: true } as const;
if (typeof ctx.params?.slug !== "string") return notFound;
const targetUrl = "https://dashboard.stripe.com/settings/connect";
return {
redirect: {
destination: targetUrl,
permanent: false,
},
};
};