import { LogoSquare } from '@/components/logo'; import { ProjectCard } from '@/components/projects/project-card'; import { notFound, redirect } from 'next/navigation'; import { getCurrentProjects, getOrganizationBySlug, isWaitlistUserAccepted, } from '@openpanel/db'; import { CreateProject } from './create-project'; interface PageProps { params: { organizationId: string; }; } export default async function Page({ params: { organizationId: organizationSlug }, }: PageProps) { const [organization, projects] = await Promise.all([ getOrganizationBySlug(organizationSlug), getCurrentProjects(organizationSlug), ]); if (!organization) { return notFound(); } if (process.env.BLOCK) { const isAccepted = await isWaitlistUserAccepted(); if (!isAccepted) { 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(`/${organizationSlug}/${projects[0].id}`); } return (

Select project

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