"use client"; import { useState } from "react"; import Link from "next/link"; import { Card, CardHeader, CardTitle, CardContent, CardFooter } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Users, Globe, Database, Cog, Settings, Waypoints, Combine } from "lucide-react"; import { useTranslations } from "next-intl"; interface OrgStat { label: string; value: number; icon: React.ReactNode; } type OrganizationLandingCardProps = { overview: { orgName: string; stats: { sites: number; resources: number; users: number; }; userRole: string; isAdmin: boolean; isOwner: boolean; orgId: string; }; }; export default function OrganizationLandingCard( props: OrganizationLandingCardProps ) { const [orgData] = useState(props); const t = useTranslations(); const orgStats: OrgStat[] = [ { label: t('sites'), value: orgData.overview.stats.sites, icon: }, { label: t('resources'), value: orgData.overview.stats.resources, icon: }, { label: t('users'), value: orgData.overview.stats.users, icon: } ]; return ( {orgData.overview.orgName}
{orgStats.map((stat, index) => (
{stat.icon} {stat.value} {stat.label}
))}
{t('accessRoleYour')}{" "} {orgData.overview.isOwner ? t('accessRoleOwner') : orgData.overview.userRole}
{orgData.overview.isAdmin && ( )}
); }