mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Fix template publishing to align with upstream project context changes
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user