mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
adding project features.
This commit is contained in:
@@ -1,9 +1,20 @@
|
||||
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>
|
||||
@@ -12,7 +23,12 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
</PageTitle>
|
||||
</PageHeader>
|
||||
<PageContent>
|
||||
|
||||
Add databases
|
||||
{availableDatabases.map(database =>
|
||||
<div key={database.id}>
|
||||
{database.name}
|
||||
</div>)}
|
||||
<ProjectForm/>
|
||||
</PageContent>
|
||||
</Page>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user