cleanup 6
continuous-integration/drone/pr Build is failing

This commit is contained in:
2026-07-03 19:46:28 -04:00
parent 5a8b773a0b
commit 457eb550e4
16 changed files with 446 additions and 365 deletions
+4 -3
View File
@@ -8,6 +8,7 @@ import {
} from '../generated/anthoLumeAPIV1';
import type { EditDocumentBody } from '../generated/model';
import { formatDuration } from '../utils/formatters';
import { dataForStatus } from '../utils/apiResponses';
import { useToastMutation } from '../hooks/useMutationWithToast';
import { ActivityIcon, DownloadIcon, EditIcon, InfoIcon, CloseIcon, CheckIcon } from '../icons';
import { Field, FieldLabel, FieldValue, FieldActions, LoadingState } from '../components';
@@ -121,12 +122,12 @@ export default function DocumentPage() {
return <LoadingState />;
}
if (!docData || docData.status !== 200) {
const document = dataForStatus(docData, 200)?.document;
if (!document) {
return <div className="text-content-muted">Document not found</div>;
}
const document = docData.data.document;
const percentage = document.percentage ?? 0;
const secondsPerPercent = document.seconds_per_percent || 0;
const totalTimeLeftSeconds = Math.round((100 - percentage) * secondsPerPercent);