mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
feat(FE-137): refactor RecordingTable to remove unused types and streamline data fetching
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user