Ratatoskr/src/app/components/upload-card/UploadFailureNote.tsx
Void ec2637a2bb
All checks were successful
Build pull request / Build pull request (pull_request) Successful in 3m54s
Upload reasons: offline and background-tab only explain a dropped request; Details lays out in the card
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 01:53:47 +00:00

22 lines
732 B
TypeScript

import React from 'react';
import { Text } from 'folds';
import { uploadFailureText } from '../../utils/uploadReason';
/** A failed upload as the card shows it: the reason and what to do, the diagnostic text one tap away. */
export function UploadFailureNote({ error }: { error: Error }) {
return (
<>
<Text size="T200">{uploadFailureText(error)}</Text>
<details style={{ flex: 1, minWidth: 0 }}>
<summary style={{ minHeight: 44, display: 'flex', alignItems: 'center' }}>
<Text as="span" size="T200">
Details
</Text>
</summary>
<Text size="T200" style={{ wordBreak: 'break-word' }}>
{error.message}
</Text>
</details>
</>
);
}