import { auth } from "@/lib/auth"; import { headers } from "next/headers"; import { redirect } from "next/navigation"; import UserCard from "./user-card"; import { OrganizationCard } from "./organization-card"; import AccountSwitcher from "@/components/account-switch"; export default async function DashboardPage() { const [session, activeSessions, deviceSessions, organization] = await Promise.all([ auth.api.getSession({ headers: await headers(), }), auth.api.listSessions({ headers: await headers(), }), auth.api.listDeviceSessions({ headers: await headers(), }), auth.api.getFullOrganization({ headers: await headers(), }), ]).catch((e) => { throw redirect("/sign-in"); }); return (