message: expenses: delete all modal, use query invalidation instead of router
diff: -import { useRouter } from 'next/router'
  -import { useMutation } from 'react-query'
  +import { useMutation, useQueryClient } from 'react-query'
  import { observer } from 'mobx-react'
  import { AxiosError, AxiosResponse } from 'axios'
  import { GridSelectionModel } from '@mui/x-data-grid'
  import { useTranslation } from 'next-i18next'
  +import { endpoints } from 'service/apiEndpoints'
  import { ExpenseResponse } from 'gql/expenses'
  import { ApiErrors } from 'service/apiErrors'
  import { useDeleteManyExpenses } from 'service/expense'
  import { ModalStore } from 'stores/dashboard/ModalStore'
  import { AlertStore } from 'stores/AlertStore'
  -import { routes } from 'common/routes'
  import DeleteAllDialog from 'components/admin/DeleteAllDialog'
  export default observer(function DeleteAllModal() {
  - const router = useRouter()
  + const queryClient = useQueryClient()
  const { hideDeleteAll, selectedIdsToDelete, setSelectedIdsToDelete } = ModalStore
  const { t } = useTranslation('expenses')
  @@ -28,10 +27,10 @@ export default observer(function DeleteAllModal() {
  mutationFn,
  onError: () => AlertStore.show(t('alerts.delete-rows.error'), 'error'),
  onSuccess: () => {
  + queryClient.invalidateQueries(endpoints.expenses.listExpenses.url)
  hideDeleteAll()
  setSelectedIdsToDelete([])
  AlertStore.show(t('alerts.delete-rows.success'), 'success')
  - router.push(routes.admin.expenses.index)
  },
  })
  