From 410d385a06413fa45636333547f77c3d606c7966 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 19 May 2021 11:04:12 +0300 Subject: [PATCH 1/2] Fix #5514 --- .../components/Contentful/Tabs/Tabs.jsx | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/shared/components/Contentful/Tabs/Tabs.jsx b/src/shared/components/Contentful/Tabs/Tabs.jsx index f107392203..12dc1fcef0 100644 --- a/src/shared/components/Contentful/Tabs/Tabs.jsx +++ b/src/shared/components/Contentful/Tabs/Tabs.jsx @@ -52,10 +52,8 @@ export default class TabsItemsLoader extends Component { const q = getQuery(); const { tabId } = this.props; const { tabIndex } = this.state; - if (q.tabs && q.tabs[tabId] && Number(q.tabs[tabId]) !== tabIndex) { - this.setState({ tabIndex: Number(q.tabs[tabId]) }); - } else { - this.updatePageUrl(); + if (q.tracks && q.tracks[tabId] && Number(q.tracks[tabId]) !== tabIndex) { + this.setState({ tabIndex: Number(q.tracks[tabId]) }); } } @@ -64,14 +62,16 @@ export default class TabsItemsLoader extends Component { } updatePageUrl() { - const q = getQuery(); - const { tabId } = this.props; - const { tabIndex } = this.state; - updateQuery({ - tabs: { - ...q.tabs, - [tabId]: tabIndex || 0, - }, + this.setState((state) => { + const q = getQuery(); + const { tabId } = this.props; + const { tabIndex } = state; + updateQuery({ + tabs: { + ...q.tracks, + [tabId]: tabIndex || 0, + }, + }); }); } From a9ee0c5a2352487bb8c7a25952d747c858305cf2 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 19 May 2021 16:35:37 +0300 Subject: [PATCH 2/2] ci: on qa --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d723a4d47b..fa3820cef5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -289,7 +289,7 @@ workflows: filters: branches: only: - - free + - contentful-tabs-fix # This is beta env for production soft releases - "build-prod-beta": context : org-global