peppa/apps/web/app/(app)/projects/page.tsx
Асель 412f5f05ce PEP-61: top menu — Home instead of Inbox, Runners and Projects pages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:02:37 +05:00

24 lines
736 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";
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 (
<>
<Flash error={error} />
<h1>
Проекты{" "}
<Link href="/projects/new" className="button primary small">
Новый проект
</Link>
</h1>
<ProjectList projects={projects} userId={user.id} />
</>
);
}