-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathpage.tsx
More file actions
18 lines (15 loc) · 675 Bytes
/
Copy pathpage.tsx
File metadata and controls
18 lines (15 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { redirect } from "next/navigation";
import { auth } from "@/auth.config";
import { RegistryAccessBoundary } from "@/components/registry/registry-access-boundary";
import { REGISTRY_ACCESS } from "@/lib/registry/access";
import { evaluateRegistryAccess } from "@/lib/registry/access.server";
export const dynamic = "force-dynamic";
export default async function RegistryPage() {
const access = await evaluateRegistryAccess((await auth())?.accessToken);
if (access.status !== REGISTRY_ACCESS.ELIGIBLE) redirect("/profile");
return (
<RegistryAccessBoundary initialLeaseDurationMs={access.leaseDurationMs}>
{null}
</RegistryAccessBoundary>
);
}