Files
nextjs-template/app/not-found.tsx
T
asepharyana d54aa7e2c2
CI / lint + typecheck + test + build (push) Canceled after 0s
feat: close remaining gaps — middleware, demo wiring, error UX, env validation
- Auth: middleware.ts guards /protected via better-auth session cookie;
  protected page reads session server-side (auth.api.getSession)
- Demo wiring (app/demo + components/demo): react-markdown + remark-gfm +
  shiki CodeBlock, RHF+zod form with react-query mutation + sonner toast,
  react-table items list (legacy API, table v9), /api/items GET+POST
  (zod v4 coercion, schema in lib/items.ts shared with unit tests)
- Error UX: app/error.tsx (retry + digest), not-found.tsx (404), loading.tsx
- Env: lib/env.ts zod-validated (no import-time throw), .env.example sync
  (NEXT_PUBLIC_BETTER_AUTH_URL), auth-client uses env
- Tooling: @vitest/coverage-v8 (test:coverage works), tsconfig cleanup
  (drop .next/dev/dev/types artifact), README rewrite, demo e2e specs
2026-09-19 22:47:26 +07:00

20 lines
639 B
TypeScript

import Link from "next/link";
export default function NotFound() {
return (
<main className="flex flex-1 flex-col items-center justify-center gap-4 p-8">
<p className="text-5xl font-bold text-muted-foreground">404</p>
<h1 className="text-2xl font-semibold">Page not found</h1>
<p className="max-w-md text-center text-sm text-muted-foreground">
The page you are looking for does not exist or has been moved.
</p>
<Link
href="/"
className="rounded-lg border bg-background px-4 py-2 text-sm font-medium hover:bg-muted"
>
Back to home
</Link>
</main>
);
}