We couldn't load your jobs.
+ +We couldn't load your jobs.
+ ++ {messages[0]} +
+ ); +} + +// Statuses come from the server page: importing @project/domain here would +// pull the Prisma client into the browser bundle. +export function NewJobForm({ statuses, today }: { statuses: readonly string[]; today: string }) { + const [state, formAction, pending] = useActionState(createJobAction, null); + const fe = state?.fieldErrors ?? {}; + const v = state?.values; + + return ( + + ); +} diff --git a/apps/web/app/jobs/new/page.tsx b/apps/web/app/jobs/new/page.tsx new file mode 100644 index 0000000..7013c3e --- /dev/null +++ b/apps/web/app/jobs/new/page.tsx @@ -0,0 +1,21 @@ +// Add-a-job page (docs/specs/jobs/list.md). +import Link from "next/link"; +import { JOB_STATUSES } from "@project/domain"; +import { NewJobForm } from "./form"; + +// Dynamic so the date-applied default is today, not the build date. +export const dynamic = "force-dynamic"; + +export default function NewJobPage() { + return ( +No jobs yet. Add the first application you've sent.
+ {addLink} +| Company | +Title | +Status | +Applied | +Follow up | +
|---|---|---|---|---|
| {j.company} | +{j.title} | +{j.status} | +{fmt(j.dateApplied)} | +{j.followUpDate ? fmt(j.followUpDate) : "—"} | +
- Signed in as {userId} (dev
- identity stub — real auth arrives in Week 8)
-
Every application you've sent, and what happened next.
- Welcome to the starter skeleton. The database is connected and ready. - Example branches add their own pages, API routes, and background workers here. -
- - Check health → - -