import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; import IdentityCard from "@/components/identity-card"; import { getIdentityCardData } from "@/lib/id/repository"; import { TriangleAlertIcon } from "lucide-react"; import { RenunciationDialog } from "./renunciation-dialog"; import { getActiveCitizenship } from "@/lib/citizenship/repository"; export async function HasCitizenship({ userId }: { userId: string }) { const identityDocument = await getIdentityCardData(userId); const citizenship = await getActiveCitizenship(userId); if (!identityDocument) { return ( Identity document unavailable Your citizenship record exists, but no identity document was found. Contact the competent authority. ); } if (!citizenship) { return ( Citizenship record unavailable We couldn't verify your active citizenship record. Contact the competent authority. ); } return (
); }