🐛(frontend) fix crash share modal on grid options
The share modal in the DocsGridItem component was crashing when opened due to a provider not initialized.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { TreeProvider } from '@gouvfr-lasuite/ui-kit';
|
||||
import { Tooltip, useModal } from '@openfun/cunningham-react';
|
||||
import { DateTime } from 'luxon';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -143,7 +144,9 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
|
||||
</Box>
|
||||
</Box>
|
||||
{shareModal.isOpen && (
|
||||
<DocShareModal doc={doc} onClose={shareModal.close} />
|
||||
<TreeProvider initialNodeId={doc.id}>
|
||||
<DocShareModal doc={doc} onClose={shareModal.close} />
|
||||
</TreeProvider>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user