From 984a641a93ecef2dede5f6dfaf5f5042068b5fad Mon Sep 17 00:00:00 2001 From: yu-i-i Date: Tue, 22 Jul 2025 18:44:29 +0200 Subject: [PATCH] Fix template publishing to align with upstream project context changes --- .../editor-manage-template-modal-wrapper.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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} /> ) }