Co-authored-by: Greg Pabian <35925521+grzpab@users.noreply.github.com> Co-authored-by: Benny Joo <sldisek783@gmail.com> Co-authored-by: zomars <zomars@me.com>
14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
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,
|
|
},
|
|
};
|
|
};
|