@@ -9,6 +9,7 @@ import { useRouter } from 'next/router';
99import { Trans , useTranslation } from 'react-i18next' ;
1010
1111import { Box , ButtonCloseModal , Text , TextErrors } from '@/components' ;
12+ import { useConfig } from '@/core' ;
1213import { KEY_LIST_DOC_TRASHBIN } from '@/docs/docs-grid' ;
1314
1415import { KEY_LIST_DOC } from '../api/useDocs' ;
@@ -29,6 +30,8 @@ export const ModalRemoveDoc = ({
2930} : ModalRemoveDocProps ) => {
3031 const { toast } = useToastProvider ( ) ;
3132 const { t } = useTranslation ( ) ;
33+ const { data : config } = useConfig ( ) ;
34+ const trashBinCutoffDays = config ?. TRASHBIN_CUTOFF_DAYS || 30 ;
3235 const { push } = useRouter ( ) ;
3336 const { hasChildren } = useDocUtils ( doc ) ;
3437 const {
@@ -116,11 +119,13 @@ export const ModalRemoveDoc = ({
116119 { hasChildren ? (
117120 < Trans t = { t } >
118121 This document and < strong > any sub-documents</ strong > will be
119- permanently deleted. This action is irreversible.
122+ placed in the trashbin. You can restore it within{ ' ' }
123+ { { days : trashBinCutoffDays } } days.
120124 </ Trans >
121125 ) : (
122126 t (
123- 'This document will be permanently deleted. This action is irreversible.' ,
127+ 'This document will be placed in the trashbin. You can restore it within {{days}} days.' ,
128+ { days : trashBinCutoffDays } ,
124129 )
125130 ) }
126131 </ Text >
0 commit comments