From 8b810e37a047407788c9502e90a1702f2ee5b6cb Mon Sep 17 00:00:00 2001 From: Simon Nedjari Date: Fri, 13 Dec 2024 10:30:46 +0100 Subject: [PATCH] change redirection path to new portal admin --- src/pages/admin/newportal/h5p/edit/[id].tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/admin/newportal/h5p/edit/[id].tsx b/src/pages/admin/newportal/h5p/edit/[id].tsx index afa113383..d48a8b018 100644 --- a/src/pages/admin/newportal/h5p/edit/[id].tsx +++ b/src/pages/admin/newportal/h5p/edit/[id].tsx @@ -21,9 +21,10 @@ const H5pEditContentPage = () => { const contentId = React.useMemo(() => getQueryString(router.query.id), [router]); const content = (h5pContent || []).find((h5p) => h5p.contentId === contentId); + const redirectPath = `/admin/newportal/h5p`; if (h5pContent && !content) { - router.push(`/admin/h5p`); + router.push(redirectPath); } if (!content) { return null; @@ -32,7 +33,7 @@ const H5pEditContentPage = () => { return (
} aria-label="breadcrumb" style={{ marginBottom: '1rem' }}> - +

Contenu H5P

@@ -48,7 +49,7 @@ const H5pEditContentPage = () => { variant: 'success', }); queryClient.invalidateQueries('h5p'); - router.push(`/admin/h5p`); + router.push(redirectPath); }} onError={(message) => { enqueueSnackbar(message, { @@ -58,7 +59,7 @@ const H5pEditContentPage = () => { >
- +