diff --git a/renderer/src/components/context/ProjectContext.js b/renderer/src/components/context/ProjectContext.js index 462575b0..225f39d1 100644 --- a/renderer/src/components/context/ProjectContext.js +++ b/renderer/src/components/context/ProjectContext.js @@ -57,6 +57,7 @@ const ProjectContextProvider = ({ children }) => { const [openImportPopUp, setOpenImportPopUp] = useState(false); const [openExportPopUp, setOpenExportPopUp] = useState(false); const [openManageProject, setOpenManageProject] = useState(false); + const [contextProjectType, setContextProjectType] = useState(""); const handleProjectFields = (prop) => (event) => { setNewProjectFields({ ...newProjectFields, [prop]: event.target.value }); @@ -411,6 +412,7 @@ const ProjectContextProvider = ({ children }) => { logger.debug('ProjectContext.js', 'In createProject'); await createProjectCommonUtils(); // common props pass for all project type + setContextProjectType(projectType); const projectMetaObj = { newProjectFields, language, @@ -437,6 +439,7 @@ const ProjectContextProvider = ({ children }) => { const createSupabaseProject = async (call, project, update, projectType) => { createProjectCommonUtils(); // common props pass for all project type + setContextProjectType(projectType); const projectMetaObj = { newProjectFields, language, @@ -550,6 +553,7 @@ const ProjectContextProvider = ({ children }) => { openPdfPopup, listResourcesForPdf, importedBookCodes, + contextProjectType, }, actions: { setDrawer, @@ -578,6 +582,7 @@ const ProjectContextProvider = ({ children }) => { setOpenPdfPopup, setListResourcesForPdf, setImportedBookCodes, + setContextProjectType, }, }; diff --git a/renderer/src/layouts/editor/SubMenuBar.js b/renderer/src/layouts/editor/SubMenuBar.js index 9da674da..3247ec93 100644 --- a/renderer/src/layouts/editor/SubMenuBar.js +++ b/renderer/src/layouts/editor/SubMenuBar.js @@ -61,6 +61,7 @@ export default function SubMenuBar() { editorSave, selectedProject, openPdfPopup, + selectedProjectMeta, }, actions: { setOpenSideBar, @@ -299,23 +300,25 @@ export default function SubMenuBar() { {/*