'use client'; import { isApiError } from '@impuestos/contracts'; import { useQuery } from '@tanstack/react-query'; import { Button } from '@/components/ui/button'; import { Card } from '@/components/ui/card'; import { Skeleton } from '@/components/ui/skeleton'; import { useT } from '@/i18n/t'; import { api } from '@/lib/api'; import { DangerZone } from './danger-zone'; import { InstallPrompt } from '@/components/install-prompt'; import { Reveal } from '@/components/ui/reveal'; import { DependentsSection } from './dependents-section'; import { IdentitySection } from './identity-section'; import { NotificationsSection } from './notifications-section'; /** * Flow E3. This screen is the trust feature: what we hold, who saw it, and the two * buttons that take it all back. Everything on it is reachable in one scroll. */ export function ProfileScreen() { const t = useT(); const profile = useQuery({ queryKey: ['me'], queryFn: ({ signal }) => api.getProfile(signal), retry: (count, error) => !isApiError(error) && count < 1, }); if (profile.isPending) { return (
{notSetUp ? t('setup.step1.title') : t('common.error.generic')}