chore: remove unnecessary crap ai added
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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[];
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user