All checks were successful
continuous-integration/drone/push Build is passing
13 lines
400 B
TypeScript
13 lines
400 B
TypeScript
import { auth } from "@/auth";
|
|
import FoldersClient from "./FoldersClient";
|
|
import { redirect } from "next/navigation";
|
|
import { headers } from "next/headers";
|
|
|
|
export default async function FoldersPage() {
|
|
const session = await auth.api.getSession(
|
|
{ headers: await headers() }
|
|
);
|
|
if (!session) redirect(`/signin?redirect=/folders`);
|
|
return <FoldersClient userId={session.user.id} />;
|
|
}
|