Browse Source

todo comment

Mao 4 years ago
parent
commit
81b021d29e

+ 3 - 1
packages/app/src/components/Navbar/SubNavButtons.jsx

@@ -9,9 +9,10 @@ import BookmarkButton from '../BookmarkButton';
 import LikeButton from '../LikeButton';
 import LikeButton from '../LikeButton';
 import PageManagement from '../Page/PageManagement';
 import PageManagement from '../Page/PageManagement';
 
 
+// TODO : once PageReactionButtons and PageMangement can be used while not depending on pageContainer,  add isSearchPageMode to render condition.
 const SubnavButtons = (props) => {
 const SubnavButtons = (props) => {
   const {
   const {
-    appContainer, navigationContainer, pageContainer, isCompactMode,
+    appContainer, navigationContainer, pageContainer, isCompactMode, isSearchPageMode,
   } = props;
   } = props;
 
 
   /* eslint-enable react/prop-types */
   /* eslint-enable react/prop-types */
@@ -61,6 +62,7 @@ SubnavButtons.propTypes = {
   navigationContainer: PropTypes.instanceOf(NavigationContainer).isRequired,
   navigationContainer: PropTypes.instanceOf(NavigationContainer).isRequired,
   pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
   pageContainer: PropTypes.instanceOf(PageContainer).isRequired,
   isCompactMode: PropTypes.bool,
   isCompactMode: PropTypes.bool,
+  isSearchPageMode: PropTypes.bool,
 };
 };
 
 
 export default SubnavButtonsWrapper;
 export default SubnavButtonsWrapper;

+ 3 - 3
packages/app/src/components/SearchPage/SearchResultContentSubNavigation.tsx

@@ -2,6 +2,7 @@ import React, { FC } from 'react';
 import LinkedPagePath from '../../models/linked-page-path';
 import LinkedPagePath from '../../models/linked-page-path';
 import PagePathHierarchicalLink from '../PagePathHierarchicalLink';
 import PagePathHierarchicalLink from '../PagePathHierarchicalLink';
 import CopyDropdown from '../Page/CopyDropdown';
 import CopyDropdown from '../Page/CopyDropdown';
+import SubNavButton from '../Navbar/SubNavButtons';
 
 
 const { DevidedPagePath } = require('@growi/core');
 const { DevidedPagePath } = require('@growi/core');
 
 
@@ -63,6 +64,7 @@ type SearchResultContentSubNavigationProps = {
   isCompactMode: boolean,
   isCompactMode: boolean,
 }
 }
 const SearchResultContentSubNavigation: FC<SearchResultContentSubNavigationProps> = (props:SearchResultContentSubNavigationProps) => {
 const SearchResultContentSubNavigation: FC<SearchResultContentSubNavigationProps> = (props:SearchResultContentSubNavigationProps) => {
+  const SubNavButtonsTypeAny : any = SubNavButton;
   return (
   return (
     <div className="grw-subnav container-fluid d-flex align-items-center justify-content-between grw-subnav-compact d-print-none">
     <div className="grw-subnav container-fluid d-flex align-items-center justify-content-between grw-subnav-compact d-print-none">
       {/* Left side */}
       {/* Left side */}
@@ -77,9 +79,7 @@ const SearchResultContentSubNavigation: FC<SearchResultContentSubNavigationProps
       <div className="d-flex">
       <div className="d-flex">
         <div className="d-flex flex-column align-items-end">
         <div className="d-flex flex-column align-items-end">
           <div className="d-flex">
           <div className="d-flex">
-            {/*
-              TODO: subnav buttons here
-             */}
+            <SubNavButtonsTypeAny isSearchPageMode></SubNavButtonsTypeAny>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>