|
@@ -1,7 +1,10 @@
|
|
|
import React, { FC } from 'react';
|
|
import React, { FC } from 'react';
|
|
|
import PagePathNav from '../PagePathNav';
|
|
import PagePathNav from '../PagePathNav';
|
|
|
|
|
+import { withUnstatedContainers } from '../UnstatedUtils';
|
|
|
|
|
+import AppContainer from '../../client/services/AppContainer';
|
|
|
|
|
|
|
|
type Props = {
|
|
type Props = {
|
|
|
|
|
+ appContainer:AppContainer
|
|
|
pageId: string,
|
|
pageId: string,
|
|
|
path: string,
|
|
path: string,
|
|
|
isEditorMode: boolean,
|
|
isEditorMode: boolean,
|
|
@@ -10,27 +13,31 @@ type Props = {
|
|
|
|
|
|
|
|
const SearchResultContentSubNavigation: FC<Props> = (props : Props) => {
|
|
const SearchResultContentSubNavigation: FC<Props> = (props : Props) => {
|
|
|
const {
|
|
const {
|
|
|
- pageId, path,
|
|
|
|
|
|
|
+ appContainer, pageId, path, isCompactMode, isEditorMode,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
+
|
|
|
|
|
+ const { isSharedUser } = appContainer;
|
|
|
return (
|
|
return (
|
|
|
- <div className="d-flex">
|
|
|
|
|
|
|
+ <div className={`grw-subnav container-fluid d-flex align-items-center justify-content-between ${isCompactMode ? 'grw-subnav-compact d-print-none' : ''}`}>
|
|
|
{/* Left side */}
|
|
{/* Left side */}
|
|
|
<div className="grw-path-nav-container">
|
|
<div className="grw-path-nav-container">
|
|
|
{/* TODO : refactor TagLabels in a way that it can be used independently from pageContainenr
|
|
{/* TODO : refactor TagLabels in a way that it can be used independently from pageContainenr
|
|
|
TASK: #80623 https://estoc.weseek.co.jp/redmine/issues/80623
|
|
TASK: #80623 https://estoc.weseek.co.jp/redmine/issues/80623
|
|
|
CONDITION reference : https://dev.growi.org/5fabddf8bbeb1a0048bcb9e9
|
|
CONDITION reference : https://dev.growi.org/5fabddf8bbeb1a0048bcb9e9
|
|
|
|
|
+ userPage is not included in search so chekcing only isSharedUser or not.
|
|
|
*/}
|
|
*/}
|
|
|
- {/* {isAbleToShowTagLabel && !isCompactMode && !isTagLabelHidden && (
|
|
|
|
|
|
|
+ {/* { !isSharedUser && !isCompactMode && (
|
|
|
<div className="grw-taglabels-container">
|
|
<div className="grw-taglabels-container">
|
|
|
<TagLabels editorMode={editorMode} />
|
|
<TagLabels editorMode={editorMode} />
|
|
|
</div>
|
|
</div>
|
|
|
)} */}
|
|
)} */}
|
|
|
- <PagePathNav pageId={pageId} pagePath={path} isCompactMode={false} isEditorMode={false} />
|
|
|
|
|
|
|
+ <PagePathNav pageId={pageId} pagePath={path} isCompactMode={isCompactMode} isEditorMode={isEditorMode} />
|
|
|
</div>
|
|
</div>
|
|
|
{/* Right side */}
|
|
{/* Right side */}
|
|
|
<div className="d-flex">
|
|
<div className="d-flex">
|
|
|
{/* TODO: refactor SubNavButtons in a way that it can be used independently from pageContainer
|
|
{/* TODO: refactor SubNavButtons in a way that it can be used independently from pageContainer
|
|
|
TASK : #80481 https://estoc.weseek.co.jp/redmine/issues/80481
|
|
TASK : #80481 https://estoc.weseek.co.jp/redmine/issues/80481
|
|
|
|
|
+ CONDITION reference: https://dev.growi.org/5fabddf8bbeb1a0048bcb9e9
|
|
|
*/}
|
|
*/}
|
|
|
{/* <SubnavButtons isCompactMode={isCompactMode} /> */}
|
|
{/* <SubnavButtons isCompactMode={isCompactMode} /> */}
|
|
|
</div>
|
|
</div>
|
|
@@ -39,4 +46,10 @@ const SearchResultContentSubNavigation: FC<Props> = (props : Props) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
-export default SearchResultContentSubNavigation;
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * Wrapper component for using unstated
|
|
|
|
|
+ */
|
|
|
|
|
+const SearchResultContentSubNavigationWrapper = withUnstatedContainers(SearchResultContentSubNavigation, [AppContainer]);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+export default SearchResultContentSubNavigationWrapper;
|