update useFileViolations

This commit is contained in:
smanylov
2026-03-27 16:45:58 +07:00
parent 022943d2af
commit f4a0222e0e
4 changed files with 7 additions and 14 deletions
@@ -22,11 +22,11 @@ interface ViolationFile {
has_previous: boolean
}
export const useFileViolations = (id: string, page: number) => {
export const useFileViolations = (id: string, page: number, status?: string) => {
return useQuery({
queryKey: ['fileViolations', id, page],
queryKey: ['fileViolations', id, page, status],
queryFn: () => {
return getFileViolations(id, page)
return getFileViolations(id, page, status)
},
select: (data: ViolationFile | null) => {
if (!data) {