chore: remove unnecessary crap ai added
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
2026-04-03 19:46:05 -04:00
parent 0930054847
commit 75c872264f
7 changed files with 9 additions and 94 deletions

View File

@@ -6,9 +6,7 @@
* OpenAPI spec version: 1.0.0
*/
import type { Document } from './document';
import type { Progress } from './progress';
export interface DocumentResponse {
document: Document;
progress?: Progress;
}

View File

@@ -6,8 +6,6 @@
* OpenAPI spec version: 1.0.0
*/
import type { Document } from './document';
import type { UserData } from './userData';
import type { WordCount } from './wordCount';
export interface DocumentsResponse {
documents: Document[];
@@ -17,6 +15,4 @@ export interface DocumentsResponse {
next_page?: number;
previous_page?: number;
search?: string;
user: UserData;
word_counts: WordCount[];
}

View File

@@ -7,7 +7,6 @@ import {
getGetDocumentQueryKey,
} from '../generated/anthoLumeAPIV1';
import { Document } from '../generated/model/document';
import { Progress } from '../generated/model/progress';
import { formatDuration } from '../utils/formatters';
import {
DeleteIcon,
@@ -54,15 +53,12 @@ export default function DocumentPage() {
}
const document = docData.data.document as Document;
const progress =
docData?.status === 200 ? (docData.data.progress as Progress | undefined) : undefined;
if (!document) {
return <div className="text-content-muted">Document not found</div>;
}
const percentage =
document.percentage ?? (progress?.percentage ? progress.percentage * 100 : 0) ?? 0;
const percentage = document.percentage ?? 0;
const secondsPerPercent = document.seconds_per_percent || 0;
const totalTimeLeftSeconds = Math.round((100 - percentage) * secondsPerPercent);