Versioning: package.json carries the app version (0.1.2 here; one bump per task with `npm run version:bump`, patch 0-9 rolling into the minor at 10), baked into the build via lib/version.ts, reported by /api/healthz and shown in Settings next to the running commit. AGENTS.md documents the rule; the native suite checks both the API and the Settings row. Fix: on desktop the app header is hidden, so every page owns its top padding — /create was the only one without `lg:pt-10`, which slammed the Study deck / Make my homework switch against the top of the window while /homework had a comfortable gap. Both now sit at 40px; the wizard suite asserts the clearance and that the two pages stay in step (90 checks). SW -> freezmo-v50.
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import { redirect } from "next/navigation";
|
|
|
|
import { ApiKeyGate } from "@/components/ApiKeyGate";
|
|
import { AppHeader } from "@/components/AppHeader";
|
|
import { RouteTransition } from "@/components/RouteTransition";
|
|
import { Sidebar, SidebarOffset } from "@/components/Sidebar";
|
|
import { UploadScreen } from "@/components/UploadScreen";
|
|
import { WizardModeSwitch } from "@/components/WizardModeSwitch";
|
|
|
|
export const metadata = {
|
|
title: "New deck",
|
|
};
|
|
|
|
export default async function CreatePage({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{ [key: string]: string | string[] | undefined }>;
|
|
}) {
|
|
const { mode } = await searchParams;
|
|
// The library's quick actions (and the mode switch) deep-link into a mode;
|
|
// a link that points at the other side is handed to the page that owns it.
|
|
if (mode === "homework") redirect("/homework?mode=homework");
|
|
|
|
return (
|
|
<ApiKeyGate>
|
|
<div className="flex min-h-dvh">
|
|
<Sidebar />
|
|
<SidebarOffset />
|
|
<main className="flex min-h-dvh min-w-0 flex-1 flex-col">
|
|
<AppHeader />
|
|
<div className="mx-auto w-full max-w-3xl flex-1 px-4 pb-tabbar lg:px-10 lg:pb-16 lg:pt-10">
|
|
<WizardModeSwitch mode="deck" />
|
|
<RouteTransition>
|
|
<UploadScreen />
|
|
</RouteTransition>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</ApiKeyGate>
|
|
);
|
|
}
|