mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
Co-authored-by: Greg Pabian <[email protected]> Co-authored-by: Benny Joo <[email protected]> Co-authored-by: zomars <[email protected]>
23 lines
588 B
TypeScript
23 lines
588 B
TypeScript
import type { GetServerSidePropsContext } from "next";
|
|
|
|
import getAppKeysFromSlug from "../../../_utils/getAppKeysFromSlug";
|
|
|
|
export interface IMakeSetupProps {
|
|
inviteLink: string;
|
|
}
|
|
|
|
export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
|
|
const notFound = { notFound: true } as const;
|
|
|
|
if (typeof ctx.params?.slug !== "string") return notFound;
|
|
let inviteLink = "";
|
|
const appKeys = await getAppKeysFromSlug("make");
|
|
if (typeof appKeys.invite_link === "string") inviteLink = appKeys.invite_link;
|
|
|
|
return {
|
|
props: {
|
|
inviteLink,
|
|
},
|
|
};
|
|
};
|