From 351e97b73fb1cc013c461c63cfa133ef0b6dc929 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 20 Sep 2021 13:28:47 +0300 Subject: [PATCH 1/2] Fix infinite loop for gig referrals --- src/shared/components/Gigs/ReferralCode/index.jsx | 10 ++++++++-- src/shared/reducers/growSurf.js | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/shared/components/Gigs/ReferralCode/index.jsx b/src/shared/components/Gigs/ReferralCode/index.jsx index 5f8a30eb82..2cd9d593c3 100644 --- a/src/shared/components/Gigs/ReferralCode/index.jsx +++ b/src/shared/components/Gigs/ReferralCode/index.jsx @@ -68,7 +68,10 @@ function ReferralCode(props) { Your referral link: { - growSurfState.data ? ( + growSurfState.loading && + } + { + growSurfState.data && (
{`https://www.topcoder.com/gigs?referralId=${growSurfState.data.id}`}
- ) : + ) + } + { + growSurfState.error && Ops, we couldn't load your profile. Please try again later or contact support. }
) diff --git a/src/shared/reducers/growSurf.js b/src/shared/reducers/growSurf.js index 77651f5166..9ee65bb740 100644 --- a/src/shared/reducers/growSurf.js +++ b/src/shared/reducers/growSurf.js @@ -26,6 +26,7 @@ function onDone(state, { payload }) { ...state, loading: false, data: payload.data, + error: payload.error || false, }; } From 3cd7a85c61b87fcc83cc5954b33a113a7c0e73e3 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Mon, 20 Sep 2021 13:29:54 +0300 Subject: [PATCH 2/2] ci: on staging --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 99c667f9f5..936025491b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -370,8 +370,7 @@ workflows: filters: &filters-staging branches: only: - - develop - - feature/link-thrive + - gig-referrals-hotfix # Production builds are exectuted # when PR is merged to the master # Don't change anything in this configuration