peppa/apps/web/app/(app)/projects/page.tsx
Асель 358fb5c0e9 PEP-66: «стори» and «эпики» in web, bot, notifications, MCP texts, help; tab tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:28:42 +05:00

35 lines
1.2 KiB
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 { Plus } from "lucide-react";
import { listUserProjects } from "@peppa/core";
import { ProjectList } from "@/components/cards";
import { Flash, PageHeader } from "@/components/common";
import { Button } from "@/components/ui/button";
import { Workspace } from "@/components/Workspace";
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 (
<Workspace>
<Flash error={error} />
<PageHeader
title="Проекты"
actions={
<Button asChild variant="default" size="sm">
<Link href="/projects/new">
<Plus />
Новый проект
</Link>
</Button>
}
>
Свои и общие проекты: доска стори, код, PR, релизы, ошибки из прода, участники.
</PageHeader>
<ProjectList projects={projects} userId={user.id} />
</Workspace>
);
}