feat(project): init
This commit is contained in:
25
app/studio/page.tsx
Normal file
25
app/studio/page.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import NavigationShell from "@/components/navigation-shell";
|
||||
import StudioClient from "@/components/studio-client";
|
||||
import { requireCurrentUser, toPublicUser } from "@/lib/auth";
|
||||
import { getQuotaSnapshotForUser } from "@/lib/quota";
|
||||
|
||||
export default async function StudioPage() {
|
||||
const user = await requireCurrentUser();
|
||||
const publicUser = toPublicUser(user);
|
||||
const quota = getQuotaSnapshotForUser(user);
|
||||
|
||||
if (!publicUser) {
|
||||
throw new Error("Unable to resolve current user.");
|
||||
}
|
||||
|
||||
return (
|
||||
<NavigationShell
|
||||
currentUser={publicUser}
|
||||
activePath="/studio"
|
||||
title="图片生成中心"
|
||||
description="在保持苹果风格观感的同时,减少滚动卡顿与无效重渲染。"
|
||||
>
|
||||
<StudioClient currentUser={publicUser} initialQuota={quota} />
|
||||
</NavigationShell>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user