Skip to content

Commit 5c146af

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

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 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,7 @@ export const ModalRemoveDoc = ({
2930
}: ModalRemoveDocProps) => {
3031
const { toast } = useToastProvider();
3132
const { t } = useTranslation();
33+
const { data: config } = useConfig();
3234
const { push } = useRouter();
3335
const { hasChildren } = useDocUtils(doc);
3436
const {
@@ -116,11 +118,12 @@ export const ModalRemoveDoc = ({
116118
{hasChildren ? (
117119
<Trans t={t}>
118120
This document and <strong>any sub-documents</strong> will be
119-
permanently deleted. This action is irreversible.
121+
placed in the trashbin. You can restore it within 30 days.
120122
</Trans>
121123
) : (
122124
t(
123-
'This document will be permanently deleted. This action is irreversible.',
125+
'This document will be placed in the trashbin. You can restore it within {{days}} days.',
126+
{ days: config?.TRASHBIN_CUTOFF_DAYS || 30 },
124127
)
125128
)}
126129
</Text>

0 commit comments

Comments
 (0)