diff --git a/CHANGELOG.md b/CHANGELOG.md index 300304455..8402b6e91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ and this project adheres to - 🐛(frontend) fix removed item in the tree #2420 - 🐛(frontend) fix service worker causing reload on tab focus #2454 - 🐛(backend) update restore ability for inherited deletion #2148 +- 🐛(frontend) stop force index redirect when delete doc #2490 ### Removed diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/components/ModalRemoveDoc.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/components/ModalRemoveDoc.tsx index 32e7de28c..cc9c5e4af 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/components/ModalRemoveDoc.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/components/ModalRemoveDoc.tsx @@ -6,7 +6,6 @@ import { VariantType, useToastProvider, } from '@gouvfr-lasuite/cunningham-react'; -import { useRouter } from 'next/router'; import { useEffect, useRef } from 'react'; import { Trans, useTranslation } from 'react-i18next'; @@ -36,7 +35,6 @@ export const ModalRemoveDoc = ({ const { t } = useTranslation(); const { data: config } = useConfig(); const trashBinCutoffDays = config?.TRASHBIN_CUTOFF_DAYS || 30; - const { push } = useRouter(); const { hasChildren } = useDocUtils(doc); const cancelButtonRef = useRef(null); @@ -50,8 +48,6 @@ export const ModalRemoveDoc = ({ onSuccess: () => { if (onSuccess) { onSuccess(doc); - } else { - void push('/'); } onClose();