import * as React from 'react' import type { GetServerSideProps } from 'next' import { getSession } from 'next-auth/react' interface PageProps { isSponsor: boolean } export default function Room({ isSponsor }: PageProps): JSX.Element { return
{isSponsor}
} export const getServerSideProps: GetServerSideProps = async (context) => { const session = await getSession(context) const id = context.query.id?.toString() return { props: { isSponsor: session?.isSponsor ?? false, }, } }