diff --git a/services/web/frontend/js/features/template/components/manage-template-modal/editor-manage-template-modal-wrapper.tsx b/services/web/frontend/js/features/template/components/manage-template-modal/editor-manage-template-modal-wrapper.tsx index bb40b64f51..ab37c40d47 100644 --- a/services/web/frontend/js/features/template/components/manage-template-modal/editor-manage-template-modal-wrapper.tsx +++ b/services/web/frontend/js/features/template/components/manage-template-modal/editor-manage-template-modal-wrapper.tsx @@ -16,12 +16,9 @@ const EditorManageTemplateModalWrapper = React.memo( handleHide, openTemplate, }: EditorManageTemplateModalWrapperProps) { - const { - _id: projectId, - name: projectName, - } = useProjectContext() + const { project } = useProjectContext() - if (!projectName) { + if (!project) { // wait for useProjectContext return null } @@ -30,8 +27,8 @@ const EditorManageTemplateModalWrapper = React.memo( handleHide={handleHide} show={show} handleAfterPublished={openTemplate} - projectId={projectId} - projectName={projectName} + projectId={project._id} + projectName={project.name} /> ) }