From e8263de32b418966727d1dca273f67c5ba52b625 Mon Sep 17 00:00:00 2001 From: Mihai Macaneata Date: Wed, 8 Apr 2020 12:40:54 +0300 Subject: [PATCH] fix siblings by redirecting again to 3rd level --- src/actions/index.js | 1 + src/components/theme/View/TabsChildView.jsx | 90 ++++++++++++------- src/components/theme/View/TabsView.jsx | 34 ++++--- src/reducers/index.js | 2 + src/reducers/section_tabs.js | 5 +- theme/themes/pastanaga/globals/site.overrides | 53 +++++++++++ 6 files changed, 136 insertions(+), 49 deletions(-) diff --git a/src/actions/index.js b/src/actions/index.js index e1b6a35e..e56facb9 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -4,6 +4,7 @@ import { export function setSectionTabs(payload) { + console.log('in action', payload) return { type: SET_SECTION_TABS, payload: payload, diff --git a/src/components/theme/View/TabsChildView.jsx b/src/components/theme/View/TabsChildView.jsx index 51abc713..d2c8b4e9 100644 --- a/src/components/theme/View/TabsChildView.jsx +++ b/src/components/theme/View/TabsChildView.jsx @@ -86,13 +86,17 @@ class DefaultView extends Component { const blocksFieldname = getBlocksFieldname(content); const blocksLayoutFieldname = getBlocksLayoutFieldname(content); const tabs = this.computeFolderTabs(content['@components'].siblings); - console.log('section tabs', this.props.sectionTabs) + const sectionTabs = this.props.sectionTabs?.items + console.log('sectionTabs in child', sectionTabs) + return ( hasBlocksData(content) && ( -
- {tabs && tabs.length ? ( -