import { redirect } from "next/navigation"; import { prisma } from "@/lib/db"; import { currentStaff } from "@/lib/staffsession"; import { pushConfigured } from "@/lib/push"; import AccountScreen from "@/components/screens/Account"; export const dynamic = "force-dynamic"; export default async function MyAccount() { const sess = await currentStaff(); if (!sess) redirect("/my/signin"); // No row means every default, which is what the schema says and what the sender assumes. The // switches are read for this session's own staff member and for nobody else — notify.prefs // writes the same way, and takes no staffId at all. const pref = await prisma.staffNotifyPref.findUnique({ where: { staffId: sess.staffId } }); return ( ); }