|
@@ -30,13 +30,15 @@ appContainer.initApp();
|
|
|
|
|
|
|
|
logger.info('AppContainer has been initialized');
|
|
logger.info('AppContainer has been initialized');
|
|
|
|
|
|
|
|
|
|
+const isSearchPage = document.getElementById('search-page') != null;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* define components
|
|
* define components
|
|
|
* key: id of element
|
|
* key: id of element
|
|
|
* value: React Element
|
|
* value: React Element
|
|
|
*/
|
|
*/
|
|
|
const componentMappings = {
|
|
const componentMappings = {
|
|
|
- 'grw-navbar': <GrowiNavbar />,
|
|
|
|
|
|
|
+
|
|
|
'grw-navbar-bottom-container': <GrowiNavbarBottom />,
|
|
'grw-navbar-bottom-container': <GrowiNavbarBottom />,
|
|
|
|
|
|
|
|
'page-create-modal': <PageCreateModal />,
|
|
'page-create-modal': <PageCreateModal />,
|
|
@@ -44,5 +46,9 @@ const componentMappings = {
|
|
|
'grw-hotkeys-manager': <HotkeysManager />,
|
|
'grw-hotkeys-manager': <HotkeysManager />,
|
|
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
+// hide GrowiNavBar when SearchPage is shown
|
|
|
|
|
+if (!isSearchPage) {
|
|
|
|
|
+ Object.assign(componentMappings, { 'grw-navbar': <GrowiNavbar /> });
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
export { appContainer, componentMappings };
|
|
export { appContainer, componentMappings };
|