feat: remove edit

This commit is contained in:
karishmas6
2024-10-10 22:56:04 +05:30
parent 98af7bad70
commit 3b46e29cf9

View File

@@ -16,7 +16,7 @@ import { useGlobalInfoStore } from "../../context/globalInfo";
import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage"; import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage";
interface Column { interface Column {
id: 'interpret' | 'name' | 'createdAt' | 'edit' | 'updatedAt' | 'delete' | 'schedule' | 'integrate'; id: 'interpret' | 'name' | 'createdAt' | 'updatedAt' | 'delete' | 'schedule' | 'integrate';
label: string; label: string;
minWidth?: number; minWidth?: number;
align?: 'right'; align?: 'right';
@@ -32,11 +32,6 @@ const columns: readonly Column[] = [
minWidth: 80, minWidth: 80,
//format: (value: string) => value.toLocaleString('en-US'), //format: (value: string) => value.toLocaleString('en-US'),
}, },
{
id: 'edit',
label: 'Edit',
minWidth: 80,
},
{ {
id: 'schedule', id: 'schedule',
label: 'Schedule', label: 'Schedule',
@@ -158,16 +153,16 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl
<InterpretButton handleInterpret={() => handleRunRecording(row.id, row.name, row.params || [])} /> <InterpretButton handleInterpret={() => handleRunRecording(row.id, row.name, row.params || [])} />
</TableCell> </TableCell>
); );
case 'edit': // case 'edit':
return ( // return (
<TableCell key={column.id} align={column.align}> // <TableCell key={column.id} align={column.align}>
<IconButton aria-label="add" size="small" onClick={() => { // <IconButton aria-label="add" size="small" onClick={() => {
handleEditRecording(row.id, row.name); // handleEditRecording(row.id, row.name);
}} sx={{ '&:hover': { color: '#1976d2', backgroundColor: 'transparent' } }}> // }} sx={{ '&:hover': { color: '#1976d2', backgroundColor: 'transparent' } }}>
<Edit /> // <Edit />
</IconButton> // </IconButton>
</TableCell> // </TableCell>
); // );
case 'schedule': case 'schedule':
return ( return (
<TableCell key={column.id} align={column.align}> <TableCell key={column.id} align={column.align}>