From d2f56aee3a6a9daf747a07421f1ecd591b307b11 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 2 Oct 2023 14:58:11 +0300 Subject: [PATCH 1/2] PROD-4399 - remove sprig integration --- config/backup-default.js | 1 - config/default.js | 1 - config/production.js | 1 - package-lock.json | 5 ----- package.json | 1 - src/client/index.jsx | 6 ------ src/shared/containers/SubmissionPage.jsx | 7 ------- 7 files changed, 22 deletions(-) diff --git a/config/backup-default.js b/config/backup-default.js index 0e399b364c..55975b7ddc 100644 --- a/config/backup-default.js +++ b/config/backup-default.js @@ -473,5 +473,4 @@ module.exports = { }, /* development id - makes surveys have warning about environment */ UNIVERSAL_NAV_URL: '//uni-nav.topcoder-dev.com/v1/tc-universal-nav.js', - SPRIG_ENVIRONMENT_ID: 'bUcousVQ0-yF', }; diff --git a/config/default.js b/config/default.js index d50de2aec7..669c9e83e1 100644 --- a/config/default.js +++ b/config/default.js @@ -477,5 +477,4 @@ module.exports = { MEMBER_PROFILE_REDIRECT_URL: 'https://profiles.topcoder-dev.com', MEMBER_SEARCH_REDIRECT_URL: 'https://talent-search.topcoder-dev.com', ACCOUNT_SETTINGS_REDIRECT_URL: 'https://account-settings.topcoder-dev.com', - SPRIG_ENVIRONMENT_ID: 'bUcousVQ0-yF', }; diff --git a/config/production.js b/config/production.js index c372930853..6830f817a0 100644 --- a/config/production.js +++ b/config/production.js @@ -238,6 +238,5 @@ module.exports = { UNIVERSAL_NAV_URL: '//uni-nav.topcoder.com/v1/tc-universal-nav.js', MEMBER_PROFILE_REDIRECT_URL: 'https://profiles.topcoder.com', MEMBER_SEARCH_REDIRECT_URL: 'https://talent-search.topcoder.com', - SPRIG_ENVIRONMENT_ID: 'a-IZBZ6-r7bU', ACCOUNT_SETTINGS_REDIRECT_URL: 'https://account-settings.topcoder.com', }; diff --git a/package-lock.json b/package-lock.json index d613edef86..34d7f5aa0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1445,11 +1445,6 @@ "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==" }, - "@sprig-technologies/sprig-browser": { - "version": "2.21.2", - "resolved": "https://registry.npmjs.org/@sprig-technologies/sprig-browser/-/sprig-browser-2.21.2.tgz", - "integrity": "sha512-AT//JgJYaMgnglVPESq5p1LB9zySoA57AnGzC4J7CgZQADMO2zlF22HilxuooMv8G561MfLPIoT3/IXV65HZJQ==" - }, "@tanem/svg-injector": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@tanem/svg-injector/-/svg-injector-1.2.1.tgz", diff --git a/package.json b/package.json index e270dbc3b7..b7df7b4ce7 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "dependencies": { "@hapi/joi": "^16.1.4", "@optimizely/react-sdk": "^2.5.0", - "@sprig-technologies/sprig-browser": "^2.20.1", "@topcoder-platform/tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.4", "aos": "^2.3.4", "atob": "^2.1.1", diff --git a/src/client/index.jsx b/src/client/index.jsx index d2a1e2c024..a239092506 100644 --- a/src/client/index.jsx +++ b/src/client/index.jsx @@ -14,14 +14,9 @@ import { } from '@topcoder-platform/tc-auth-lib'; import { actions, logger, errors } from 'topcoder-react-lib'; import { client, redux, config } from 'topcoder-react-utils'; -import { sprig } from '@sprig-technologies/sprig-browser/dist'; import './styles.scss'; -const Sprig = sprig.configure({ - environmentId: config.SPRIG_ENVIRONMENT_ID, -}); - const { setErrorsStore } = errors; /** @@ -60,7 +55,6 @@ function identify(profile, roles, userIdHash) { integrations: { All: false, Chameleon: true }, }, ); - Sprig('setUserId', profile.handle); } /** diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index 43b46c6b4e..f586a6524e 100644 --- a/src/shared/containers/SubmissionPage.jsx +++ b/src/shared/containers/SubmissionPage.jsx @@ -19,11 +19,6 @@ import { connect } from 'react-redux'; import SubmissionsPage from 'components/SubmissionPage'; import AccessDenied, { CAUSE as ACCESS_DENIED_REASON } from 'components/tc-communities/AccessDenied'; import LoadingIndicator from 'components/LoadingIndicator'; -import { sprig } from '@sprig-technologies/sprig-browser/dist'; - -export const Sprig = sprig.configure({ - environmentId: config.SPRIG_ENVIRONMENT_ID, -}); /** * SubmissionsPage Container @@ -71,8 +66,6 @@ class SubmissionsPageContainer extends React.Component { track, } = this.props; - // On final upload, the survey should appear - Sprig('track', 'onUploadSubmission'); submit(tokenV3, tokenV2, challengeId, body, isMM(challenge) ? 'DEVELOP' : track); } From 9297895f1073caf53e44dedf4bd60920a733b007 Mon Sep 17 00:00:00 2001 From: Vasilica Olariu Date: Mon, 2 Oct 2023 15:07:00 +0300 Subject: [PATCH 2/2] tests cleanup --- src/client/index.jsx | 2 +- src/shared/containers/SubmissionPage.jsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/index.jsx b/src/client/index.jsx index a239092506..b879711ac2 100644 --- a/src/client/index.jsx +++ b/src/client/index.jsx @@ -13,7 +13,7 @@ import { getFreshToken, } from '@topcoder-platform/tc-auth-lib'; import { actions, logger, errors } from 'topcoder-react-lib'; -import { client, redux, config } from 'topcoder-react-utils'; +import { client, redux } from 'topcoder-react-utils'; import './styles.scss'; diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index f586a6524e..80579b39ab 100644 --- a/src/shared/containers/SubmissionPage.jsx +++ b/src/shared/containers/SubmissionPage.jsx @@ -8,7 +8,6 @@ */ import actions from 'actions/page/submission'; import { actions as api } from 'topcoder-react-lib'; -import { config } from 'topcoder-react-utils'; import { isMM } from 'utils/challenge'; import communityActions from 'actions/tc-communities'; import { PrimaryButton } from 'topcoder-react-ui-kit';