"use client"; import { useState } from "react"; import { Card, CardHeader, CardTitle, CardContent, CardDescription } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import Link from "next/link"; import { ArrowRight, Plus } from "lucide-react"; interface Organization { id: string; name: string; } interface OrganizationLandingProps { organizations?: Organization[]; disableCreateOrg?: boolean; } export default function OrganizationLanding({ organizations = [], disableCreateOrg = false }: OrganizationLandingProps) { const [selectedOrg, setSelectedOrg] = useState(null); const handleOrgClick = (orgId: string) => { setSelectedOrg(orgId); }; function getDescriptionText() { if (organizations.length === 0) { if (!disableCreateOrg) { return "You are not currently a member of any organizations. Create an organization to get started."; } else { return "You are not currently a member of any organizations."; } } return `You're a member of ${organizations.length} ${ organizations.length === 1 ? "organization" : "organizations" }.`; } return ( Welcome to Pangolin {getDescriptionText()} {organizations.length === 0 ? ( disableCreateOrg ? (

You are not currently a member of any organizations.

) : ( ) ) : (
    {organizations.map((org) => (
  • ))}
)}
); }