import { CloudOff, Loader2, RotateCcw } from 'lucide-react' import { useTranslation } from '../../i18n' import type { SharedTripLoadError } from './sharedTripModel' interface SharedTripErrorScreenProps { reason: SharedTripLoadError retrying: boolean onRetry: () => void } /** * The full-page state of a share link whose payload did not arrive. Only * 'expired' tells the viewer the link is dead; 'unavailable' says the load * failed and offers another go, since the same link usually works on the next * request (#2505). */ export function SharedTripErrorScreen({ reason, retrying, onRetry }: SharedTripErrorScreenProps) { const { t } = useTranslation() const expired = reason === 'expired' return (
{expired ? (
🔒
) : ( )}

{t(expired ? 'shared.expired' : 'shared.loadFailed')}

{t(expired ? 'shared.expiredHint' : 'shared.loadFailedHint')}

{!expired && ( )}
) }