mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
35 lines
960 B
TypeScript
35 lines
960 B
TypeScript
import {PageParams} from "@/types/next";
|
|
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
|
import {prisma} from "@/prisma";
|
|
import {ProjectForm} from "@/components/wrappers/project/ProjectForm";
|
|
|
|
|
|
export default async function RoutePage(props: PageParams<{}>) {
|
|
|
|
const availableDatabases = await prisma.database.findMany({
|
|
where: {
|
|
projectId: null
|
|
},
|
|
orderBy: {
|
|
createdAt: 'desc',
|
|
},
|
|
})
|
|
|
|
return (
|
|
<Page>
|
|
<PageHeader>
|
|
<PageTitle>
|
|
Create new project
|
|
</PageTitle>
|
|
</PageHeader>
|
|
<PageContent>
|
|
Add databases
|
|
{availableDatabases.map(database =>
|
|
<div key={database.id}>
|
|
{database.name}
|
|
</div>)}
|
|
<ProjectForm/>
|
|
</PageContent>
|
|
</Page>
|
|
)
|
|
} |