feat(FE-137): refactor RecordingTable to remove unused types and streamline data fetching

This commit is contained in:
rstubryan
2025-10-24 11:37:25 +07:00
parent 258324f092
commit c546bd6b3c
@@ -18,14 +18,7 @@ import RowDropdownOptions from '@/components/table/RowDropdownOptions';
import RowCollapseOptions from '@/components/table/RowCollapseOptions';
import { type CellContext } from '@tanstack/react-table';
import { type Recording } from '@/types/api/production/recording';
import { type ProjectFlock } from '@/types/api/production/project-flock';
import { RecordingApi } from '@/services/api/production';
import { type BaseApiResponse } from '@/types/api/api-general';
// Extended type that includes related data
type RecordingWithRelations = Recording & {
project_flock?: ProjectFlock;
};
const RowOptionsMenu = ({
type = 'dropdown',
@@ -98,11 +91,9 @@ const RecordingTable = () => {
const bulkApproveModal = useModal();
const bulkRejectModal = useModal();
// Fetch recordings using SWR
const {
data: recordings,
isLoading,
mutate: refreshRecordings,
} = useSWR(
`${RecordingApi.basePath}?page=${page}&limit=${pageSize}`,
RecordingApi.getAllFetcher