diff --git a/app/src/thunks/tableThunks.ts b/app/src/thunks/tableThunks.ts index 3220b05dde..7e09e6da6b 100644 --- a/app/src/thunks/tableThunks.ts +++ b/app/src/thunks/tableThunks.ts @@ -49,7 +49,6 @@ import { setGroupColumns } from "../actions/groupActions"; import { fetchAcls, setAclColumns } from "../slices/aclSlice"; import { setThemeColumns } from "../actions/themeActions"; import { setServicesColumns } from "../actions/serviceActions"; -import { useAppDispatch } from "../store"; /** * This file contains methods/thunks used to manage the table in the main view and its state changes @@ -407,7 +406,6 @@ export const loadThemesIntoTable = () => (dispatch, getState) => { // Navigate between pages // @ts-expect-error TS(7006): Parameter 'pageNumber' implicitly has an 'any' typ... Remove this comment to see the full error message export const goToPage = (pageNumber) => async (dispatch, getState) => { - const appDispatch = useAppDispatch(); dispatch(deselectAll()); dispatch(setOffset(pageNumber)); @@ -462,7 +460,7 @@ export const goToPage = (pageNumber) => async (dispatch, getState) => { break; } case "acls": { - await appDispatch(fetchAcls()); + await dispatch(fetchAcls()); dispatch(loadAclsIntoTable()); break; } @@ -477,7 +475,6 @@ export const goToPage = (pageNumber) => async (dispatch, getState) => { // Update pages for example if page size was changed // @ts-expect-error TS(7006): Parameter 'dispatch' implicitly has an 'any' type. export const updatePages = () => async (dispatch, getState) => { - const appDispatch = useAppDispatch(); const state = getState(); const pagination = getTablePagination(state); @@ -534,7 +531,7 @@ export const updatePages = () => async (dispatch, getState) => { break; } case "acls": { - await appDispatch(fetchAcls()); + await dispatch(fetchAcls()); dispatch(loadAclsIntoTable()); break; }