mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
import {PageParams} from "@/types/next";
|
|
import {Page, PageActions, PageContent, PageDescription, PageTitle} from "@/features/layout/page";
|
|
import {buttonVariants} from "@/components/ui/button";
|
|
|
|
import {prisma} from "@/prisma";
|
|
import {GearIcon} from "@radix-ui/react-icons";
|
|
import Link from "next/link";
|
|
import {projects} from "@/utils/mock-data";
|
|
|
|
|
|
export default async function RoutePage(props: PageParams<{ projectId: string }>) {
|
|
|
|
const {projectId} = await props.params
|
|
|
|
// const project = await prisma.project.findUnique({
|
|
// where: {
|
|
// id: projectId,
|
|
// },
|
|
// })
|
|
|
|
const project = projects.find(p => p.id === projectId)
|
|
|
|
|
|
return (
|
|
<Page>
|
|
<div className="justify-between gap-2 sm:flex">
|
|
<PageTitle className="flex items-center">
|
|
{project.name}
|
|
<Link className={buttonVariants({variant: "outline"})}
|
|
href={`/dashboard/projects/${project.id}/edit`}>
|
|
<GearIcon className="w-7 h-7"/>
|
|
</Link>
|
|
</PageTitle>
|
|
<PageActions className="justify-between">
|
|
|
|
</PageActions>
|
|
</div>
|
|
{/*<PageDescription className="mt-5 sm:mt-0">{project.description}</PageDescription>*/}
|
|
<PageContent className="flex flex-col w-full h-full">
|
|
</PageContent>
|
|
</Page>
|
|
)
|
|
} |