Skip to content

Commit bd78617

Browse files
committed
fixup! ✨(frontend) can restore from trashbin list actions
1 parent 0f826ed commit bd78617

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/frontend/apps/impress/src/features/docs/doc-management/components/ModalRemoveDoc.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { useRouter } from 'next/router';
99
import { Trans, useTranslation } from 'react-i18next';
1010

1111
import { Box, ButtonCloseModal, Text, TextErrors } from '@/components';
12+
import { useConfig } from '@/core';
1213
import { KEY_LIST_DOC_TRASHBIN } from '@/docs/docs-grid';
1314

1415
import { 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

Comments
 (0)