peppa/apps/web/app/(app)/projects/page.tsx
Асель 28fbde4add PEP-38: console foundation — Tailwind v4, shadcn/ui components, dark theme, three-panel layout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:21:43 +05:00

25 lines
806 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Link from "next/link";
import { listUserProjects } from "@peppa/core";
import { Flash, ProjectList } from "@/components/ui";
import { requireUser } from "@/lib/auth";
import { db } from "@/lib/db";
import { Workspace } from "@/components/Workspace";
export default async function Projects({ searchParams }: { searchParams: Promise<{ error?: string }> }) {
const user = await requireUser();
const { error } = await searchParams;
const projects = await listUserProjects(db, user.id);
return (
<Workspace>
<Flash error={error} />
<h1>
Проекты{" "}
<Link href="/projects/new" className="button primary small">
Новый проект
</Link>
</h1>
<ProjectList projects={projects} userId={user.id} />
</Workspace>
);
}