diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index ee510761..997c4023 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -15,7 +15,7 @@ import { useGlobalInfoStore } from "../../context/globalInfo"; import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage"; interface Column { - id: 'interpret' | 'name' | 'create_date' | 'edit' | 'pairs' | 'update_date'| 'delete'; + id: 'interpret' | 'name' | 'create_date' | 'edit' | 'pairs' | 'update_date' | 'delete'; label: string; minWidth?: number; align?: 'right'; @@ -65,8 +65,8 @@ interface Data { } interface RecordingsTableProps { - handleEditRecording: (fileName:string) => void; - handleRunRecording: (fileName:string, params: string[]) => void; + handleEditRecording: (fileName: string) => void; + handleRunRecording: (fileName: string, params: string[]) => void; } export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: RecordingsTableProps) => { @@ -106,7 +106,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: Rec } } - useEffect( () => { + useEffect(() => { if (rows.length === 0) { fetchRecordings(); } @@ -138,7 +138,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: Rec {columns.map((column) => { // @ts-ignore - const value : any = row[column.id]; + const value: any = row[column.id]; if (value !== undefined) { return ( @@ -150,23 +150,23 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: Rec case 'interpret': return ( - handleRunRecording(row.name, row.params || [])}/> + handleRunRecording(row.name, row.params || [])} /> ); case 'edit': return ( - { + { handleEditRecording(row.name); - }} sx={{'&:hover': { color: '#1976d2', backgroundColor: 'transparent' }}}> - + }} sx={{ '&:hover': { color: '#1976d2', backgroundColor: 'transparent' } }}> + ); case 'delete': return ( - { + { deleteRecordingFromStorage(row.name).then((result: boolean) => { if (result) { setRows([]); @@ -174,20 +174,20 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording }: Rec fetchRecordings(); } }) - }} sx={{'&:hover': { color: '#1976d2', backgroundColor: 'transparent' }}}> - + }} sx={{ '&:hover': { color: '#1976d2', backgroundColor: 'transparent' } }}> + ); default: - return null; + return null; } } })} ); }) - : null } + : null} @@ -208,13 +208,13 @@ interface InterpretButtonProps { handleInterpret: () => void; } -const InterpretButton = ( {handleInterpret}:InterpretButtonProps) => { +const InterpretButton = ({ handleInterpret }: InterpretButtonProps) => { return ( - { + { handleInterpret(); }} - sx={{'&:hover': { color: '#1976d2', backgroundColor: 'transparent' }}}> - + sx={{ '&:hover': { color: '#1976d2', backgroundColor: 'transparent' } }}> + ) }