mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import {PageParams} from "@/types/next";
|
|
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
|
import {prisma} from "@/prisma";
|
|
import {ProjectForm} from "@/components/wrappers/Dashboard/Projects/ProjectsForm/ProjectForm";
|
|
|
|
|
|
export default async function RoutePage(props: PageParams<{}>) {
|
|
|
|
const availableDatabases = await prisma.database.findMany({
|
|
where: {
|
|
projectId: null
|
|
},
|
|
include: {
|
|
agent: {}
|
|
},
|
|
orderBy: {
|
|
createdAt: 'desc',
|
|
},
|
|
})
|
|
|
|
const organization = await prisma.organization.findFirst({
|
|
where: {
|
|
slug: 'default',
|
|
}
|
|
})
|
|
|
|
return (
|
|
<Page>
|
|
<PageHeader>
|
|
<PageTitle>
|
|
Create new project
|
|
</PageTitle>
|
|
</PageHeader>
|
|
<PageContent>
|
|
<ProjectForm databases={availableDatabases} organization={organization}/>
|
|
</PageContent>
|
|
</Page>
|
|
)
|
|
} |