فهرست منبع

84092 hide search page

Mao 4 سال پیش
والد
کامیت
16c286358e
2فایلهای تغییر یافته به همراه16 افزوده شده و 9 حذف شده
  1. 3 1
      packages/app/src/components/Navbar/GrowiNavbar.tsx
  2. 13 8
      packages/app/src/components/Navbar/GrowiNavbarBottom.jsx

+ 3 - 1
packages/app/src/components/Navbar/GrowiNavbar.tsx

@@ -85,6 +85,8 @@ const GrowiNavbar = (props) => {
 
 
   const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
   const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
 
 
+  const isNotSearchPage = document.getElementById('search-page') == null;
+
   return (
   return (
     <>
     <>
       {/* Brand Logo  */}
       {/* Brand Logo  */}
@@ -105,7 +107,7 @@ const GrowiNavbar = (props) => {
         <Confidential confidential={crowi.confidential}></Confidential>
         <Confidential confidential={crowi.confidential}></Confidential>
       </ul>
       </ul>
 
 
-      { isSearchServiceConfigured && !isDeviceSmallerThanMd && (
+      { isSearchServiceConfigured && !isDeviceSmallerThanMd && isNotSearchPage && (
         <div className="grw-global-search grw-global-search-top position-absolute">
         <div className="grw-global-search grw-global-search-top position-absolute">
           <GlobalSearch />
           <GlobalSearch />
         </div>
         </div>

+ 13 - 8
packages/app/src/components/Navbar/GrowiNavbarBottom.jsx

@@ -17,6 +17,8 @@ const GrowiNavbarBottom = (props) => {
     additionalClasses.push('grw-navbar-bottom-drawer-opened');
     additionalClasses.push('grw-navbar-bottom-drawer-opened');
   }
   }
 
 
+  const isNotSearchPage = document.getElementById('search-page') == null;
+
   return (
   return (
     <div className="d-md-none d-edit-none fixed-bottom">
     <div className="d-md-none d-edit-none fixed-bottom">
 
 
@@ -41,14 +43,17 @@ const GrowiNavbarBottom = (props) => {
             </a>
             </a>
           </li>
           </li>
           <li className="nav-item mx-auto">
           <li className="nav-item mx-auto">
-            <a
-              role="button"
-              className="nav-link btn-lg"
-              data-target="#grw-global-search-collapse"
-              data-toggle="collapse"
-            >
-              <i className="icon-magnifier"></i>
-            </a>
+            {isNotSearchPage
+            && (
+              <a
+                role="button"
+                className="nav-link btn-lg"
+                data-target="#grw-global-search-collapse"
+                data-toggle="collapse"
+              >
+                <i className="icon-magnifier"></i>
+              </a>
+            )}
           </li>
           </li>
           <li className="nav-item">
           <li className="nav-item">
             <a
             <a