fix: avoid canvas redirect shell flash

This commit is contained in:
Your Name 2026-06-01 13:21:10 +08:00
parent 25a1a005a4
commit 1c8a709670
2 changed files with 14 additions and 0 deletions

12
app/canvas/loading.tsx Normal file
View File

@ -0,0 +1,12 @@
import { Loader2 } from "lucide-react";
export default function CanvasLoading() {
return (
<div className="flex h-dvh w-screen items-center justify-center bg-[#050607] text-white/70">
<div className="flex flex-col items-center gap-4 rounded-[32px] border border-white/10 bg-white/[0.04] px-8 py-7 shadow-[0_24px_90px_rgba(0,0,0,0.42)]">
<Loader2 className="h-5 w-5 animate-spin text-emerald-300" />
<div className="text-sm tracking-[0.08em]">正在进入工作台...</div>
</div>
</div>
);
}

View File

@ -5,6 +5,8 @@ import { db } from "@/lib/db";
import { canvasProject } from "@/lib/db/schema";
import { and, desc, eq } from "drizzle-orm";
export const dynamic = "force-dynamic";
type CanvasRedirectPageProps = {
searchParams?: Promise<Record<string, string | string[] | undefined>>;
};