be consistent
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
export interface Device {
|
||||
id?: string;
|
||||
device_name?: string;
|
||||
created_at?: string;
|
||||
last_synced?: string;
|
||||
id: string;
|
||||
device_name: string;
|
||||
created_at: string;
|
||||
last_synced: string;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
export interface Progress {
|
||||
title?: string;
|
||||
author?: string;
|
||||
device_name?: string;
|
||||
device_name: string;
|
||||
device_id?: string;
|
||||
percentage?: number;
|
||||
percentage: number;
|
||||
progress?: string;
|
||||
document_id?: string;
|
||||
user_id?: string;
|
||||
created_at?: string;
|
||||
document_id: string;
|
||||
user_id: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
@@ -14,5 +14,4 @@ export interface SearchItem {
|
||||
series?: string;
|
||||
file_type?: string;
|
||||
file_size?: string;
|
||||
upload_date?: string;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export default function ProgressPage() {
|
||||
{
|
||||
id: 'percentage',
|
||||
header: 'Percentage',
|
||||
render: row => (typeof row.percentage === 'number' ? `${Math.round(row.percentage)}%` : '0%'),
|
||||
render: row => `${Math.round(row.percentage)}%`,
|
||||
},
|
||||
{
|
||||
id: 'created_at',
|
||||
|
||||
@@ -77,7 +77,6 @@ describe('SearchPage', () => {
|
||||
series: 'Earthsea',
|
||||
file_type: 'epub',
|
||||
file_size: '1 MB',
|
||||
upload_date: '2025-01-01',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -6,7 +6,6 @@ import { Button, Table, type Column, TextInput, IconInput } from '../components'
|
||||
import { inputClassName } from '../components/TextInput';
|
||||
import { useDebouncedState } from '../hooks/useDebouncedState';
|
||||
import { Search2Icon, BookIcon } from '../icons';
|
||||
import { formatDate } from '../utils/formatters';
|
||||
import { dataForStatus } from '../utils/apiResponses';
|
||||
|
||||
const searchColumns: Column<SearchItem>[] = [
|
||||
@@ -18,12 +17,6 @@ const searchColumns: Column<SearchItem>[] = [
|
||||
{ id: 'series', header: 'Series', render: item => item.series || 'N/A' },
|
||||
{ id: 'type', header: 'Type', render: item => item.file_type || 'N/A' },
|
||||
{ id: 'size', header: 'Size', render: item => item.file_size || 'N/A' },
|
||||
{
|
||||
id: 'date',
|
||||
header: 'Date',
|
||||
className: 'hidden md:table-cell',
|
||||
render: item => formatDate(item.upload_date),
|
||||
},
|
||||
];
|
||||
|
||||
interface SearchPageViewProps {
|
||||
|
||||
Reference in New Issue
Block a user