'use client'; import { FunctionComponent } from 'react'; import { CircularProgress, Stack, Typography } from '@mui/material'; import { useTranslations } from 'next-intl'; import { AppButton } from '@/components'; import AppIcon from '@/components/common/AppIcon'; import BrandMark from './BrandMark'; interface AuthAccountErrorProps { onRetry: () => void; isRetrying: boolean; } /** * Shown by `RoleGuard` when `/me` fails on a private route (e.g. the API is unreachable). Surfacing an * explicit "couldn't load your account" recovery is the deliberate alternative to silently defaulting to * the customer shell — a transient error must never downgrade a nurse/admin to the family app. * @component AuthAccountError */ const AuthAccountError: FunctionComponent = ({ onRetry, isRetrying }) => { const t = useTranslations('auth'); return ( {t('account_error_title')} {t('account_error_body')} : undefined} > {t('account_error_retry')} ); }; export default AuthAccountError;