Refactor: Remove item_edit_history_view

This commit is contained in:
gpt-engineer-app[bot]
2025-11-02 23:55:49 +00:00
parent 9c4b80e454
commit c59d8e40d5
8 changed files with 369 additions and 63 deletions

View File

@@ -0,0 +1,17 @@
import { useQuery } from '@tanstack/react-query';
import { fetchEditHistory } from '@/lib/submissionItemsService';
/**
* Phase 4: Hook to fetch edit history for a submission item
*/
export function useEditHistory(itemId: string | null) {
return useQuery({
queryKey: ['item-edit-history', itemId],
queryFn: () => {
if (!itemId) return [];
return fetchEditHistory(itemId);
},
enabled: !!itemId,
staleTime: 30000, // 30 seconds
});
}