import { ExternalLinkIcon } from "@heroicons/react/solid"; import { GetServerSidePropsContext } from "next"; import { getSession } from "@lib/auth"; import prisma from "@lib/prisma"; import SettingsShell from "@components/SettingsShell"; import Shell from "@components/Shell"; import Button from "@components/ui/Button"; export default function Billing() { return (

View and manage your billing details

View and edit your billing details, as well as cancel your subscription.

Need anything else?

If you need any further help with billing, our support team are here to help.

); } export async function getServerSideProps(context: GetServerSidePropsContext) { const session = await getSession(context); if (!session) { return { redirect: { permanent: false, destination: "/auth/login" } }; } const user = await prisma.user.findFirst({ where: { email: session.user.email, }, select: { id: true, username: true, name: true, email: true, bio: true, avatar: true, timeZone: true, weekStart: true, }, }); return { props: { session, user }, }; }