import { LogoSquare } from '@/components/Logo'; import { ProjectCard } from '@/components/projects/project-card'; import { getOrganizationBySlug, getProjectsByOrganizationSlug, } from '@openpanel/db'; import { notFound, redirect } from 'next/navigation'; import { CreateProject } from './create-project'; interface PageProps { params: { organizationId: string; }; } export default async function Page({ params: { organizationId } }: PageProps) { const [organization, projects] = await Promise.all([ getOrganizationBySlug(organizationId), getProjectsByOrganizationSlug(organizationId), ]); if (!organization) { return notFound(); } if (process.env.BLOCK) { return (

Not quite there yet

We're still working on Openpanel, but we're not quite there yet. We'll let you know when we're ready to go!
); } if (projects.length === 0) { return (
); } if (projects.length === 1 && projects[0]) { return redirect(`/${organizationId}/${projects[0].id}`); } return (

Select project

{projects.map((item) => ( ))}
); }