fix: avoid canvas redirect shell flash
This commit is contained in:
parent
25a1a005a4
commit
1c8a709670
12
app/canvas/loading.tsx
Normal file
12
app/canvas/loading.tsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@ -5,6 +5,8 @@ import { db } from "@/lib/db";
|
|||||||
import { canvasProject } from "@/lib/db/schema";
|
import { canvasProject } from "@/lib/db/schema";
|
||||||
import { and, desc, eq } from "drizzle-orm";
|
import { and, desc, eq } from "drizzle-orm";
|
||||||
|
|
||||||
|
export const dynamic = "force-dynamic";
|
||||||
|
|
||||||
type CanvasRedirectPageProps = {
|
type CanvasRedirectPageProps = {
|
||||||
searchParams?: Promise<Record<string, string | string[] | undefined>>;
|
searchParams?: Promise<Record<string, string | string[] | undefined>>;
|
||||||
};
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user