diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a26df6d2a..621db64129 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -359,6 +359,7 @@ workflows: only: - develop - TOP-1390 + - PM-191-2 # This is alternate dev env for parallel testing # Deprecate this workflow due to beta env shutdown # https://topcoder.atlassian.net/browse/CORE-251 diff --git a/Dockerfile b/Dockerfile index feb8d0a005..7691feebdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,8 +71,6 @@ ARG GSHEETS_API_KEY # Gig work referrals ARG SENDGRID_API_KEY -ARG GROWSURF_API_KEY -ARG GROWSURF_CAMPAIGN_ID ARG GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY # Optimizely @@ -141,8 +139,6 @@ ENV CONTENTFUL_EDU_PREVIEW_API_KEY=$CONTENTFUL_EDU_PREVIEW_API_KEY ENV RECRUITCRM_API_KEY=$RECRUITCRM_API_KEY ENV COMMUNITY_APP_URL=$COMMUNITY_APP_URL ENV SENDGRID_API_KEY=$SENDGRID_API_KEY -ENV GROWSURF_API_KEY=$GROWSURF_API_KEY -ENV GROWSURF_CAMPAIGN_ID=$GROWSURF_CAMPAIGN_ID ENV GSHEETS_API_KEY=$GSHEETS_API_KEY ENV GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY=$GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY diff --git a/build.sh b/build.sh index ae6656897a..a3650db356 100755 --- a/build.sh +++ b/build.sh @@ -50,8 +50,6 @@ docker build -t $TAG \ --build-arg CONTENTFUL_COMCAST_PREVIEW_API_KEY=$CONTENTFUL_COMCAST_PREVIEW_API_KEY \ --build-arg RECRUITCRM_API_KEY=$RECRUITCRM_API_KEY \ --build-arg SENDGRID_API_KEY=$SENDGRID_API_KEY \ - --build-arg GROWSURF_API_KEY=$GROWSURF_API_KEY \ - --build-arg GROWSURF_CAMPAIGN_ID=$GROWSURF_CAMPAIGN_ID \ --build-arg GSHEETS_API_KEY=$GSHEETS_API_KEY \ --build-arg OPTIMIZELY_SDK_KEY=$OPTIMIZELY_SDK_KEY \ --build-arg COMMUNITY_APP_URL=$COMMUNITY_APP_URL \ diff --git a/config/backup-default.js b/config/backup-default.js index f7d0e839b5..2ea3ca1ee5 100644 --- a/config/backup-default.js +++ b/config/backup-default.js @@ -257,7 +257,6 @@ module.exports = { }, RECRUITCRM_API_KEY: '', - GROWSURF_API_KEY: '', SENDGRID_API_KEY: '', JWT_AUTH: { SECRET: 'mysecret', @@ -266,15 +265,8 @@ module.exports = { }, CHAMELEON_VERIFICATION_SECRET: 'mysecret', }, - GROWSURF_CAMPAIGN_ID: '', - GROWSURF_COOKIE: '_tc_gigs_ref', - GROWSURF_COOKIE_SETTINGS: { - secure: true, - domain: '', - expires: 30, // days - }, - GSHEETS_API_KEY: 'AIzaSyBRdKySN5JNCb2H6ZxJdTTvp3cWU51jiOQ', + GSHEETS_API_KEY: '', GOOGLE_SERVICE_ACCOUNT_EMAIL: 'communityappserviceacc@tc-sheets-to-contentful.iam.gserviceaccount.com', GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: '', GIG_REFERRALS_SHEET: '1xilx7NxDAvzAzOTbPpvb3lL3RWv1VD5W24OEMAoF9HU', diff --git a/config/custom-environment-variables.js b/config/custom-environment-variables.js index 7a46f7a078..38d3c74933 100644 --- a/config/custom-environment-variables.js +++ b/config/custom-environment-variables.js @@ -99,11 +99,9 @@ module.exports = { }, RECRUITCRM_API_KEY: 'RECRUITCRM_API_KEY', - GROWSURF_API_KEY: 'GROWSURF_API_KEY', SENDGRID_API_KEY: 'SENDGRID_API_KEY', CHAMELEON_VERIFICATION_SECRET: 'CHAMELEON_VERIFICATION_SECRET', }, - GROWSURF_CAMPAIGN_ID: 'GROWSURF_CAMPAIGN_ID', AUTH_CONFIG: { AUTH0_URL: 'TC_M2M_AUTH0_URL', AUTH0_AUDIENCE: 'TC_M2M_AUDIENCE', diff --git a/config/default.js b/config/default.js index 37cf1664c7..e30ec05227 100644 --- a/config/default.js +++ b/config/default.js @@ -258,7 +258,6 @@ module.exports = { }, RECRUITCRM_API_KEY: '', - GROWSURF_API_KEY: '', SENDGRID_API_KEY: '', JWT_AUTH: { SECRET: 'mysecret', @@ -267,15 +266,8 @@ module.exports = { }, CHAMELEON_VERIFICATION_SECRET: 'mysecret', }, - GROWSURF_CAMPAIGN_ID: '', - GROWSURF_COOKIE: '_tc_gigs_ref', - GROWSURF_COOKIE_SETTINGS: { - secure: true, - domain: '', - expires: 30, // days - }, - GSHEETS_API_KEY: 'AIzaSyBRdKySN5JNCb2H6ZxJdTTvp3cWU51jiOQ', + GSHEETS_API_KEY: '', GOOGLE_SERVICE_ACCOUNT_EMAIL: 'communityappserviceacc@tc-sheets-to-contentful.iam.gserviceaccount.com', GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: '', GIG_REFERRALS_SHEET: '1xilx7NxDAvzAzOTbPpvb3lL3RWv1VD5W24OEMAoF9HU', diff --git a/docs/postman/Community APP.postman_environment.json b/docs/postman/Community APP.postman_environment.json index 5e5fc77710..aac58a2c8a 100644 --- a/docs/postman/Community APP.postman_environment.json +++ b/docs/postman/Community APP.postman_environment.json @@ -9,17 +9,17 @@ }, { "key": "token", - "value": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5VSkZORGd4UlRVME5EWTBOVVkzTlRkR05qTXlRamxETmpOQk5UYzVRVUV3UlRFeU56TTJRUSJ9.eyJodHRwczovL3RvcGNvZGVyLWRldi5jb20vcm9sZXMiOlsiVG9wY29kZXIgVXNlciJdLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdXNlcklkIjoiODg3NzQ2MzQiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vaGFuZGxlIjoiaXNiaWxpciIsImh0dHBzOi8vdG9wY29kZXItZGV2LmNvbS91c2VyX2lkIjoiYXV0aDB8ODg3NzQ2MzQiLCJodHRwczovL3RvcGNvZGVyLWRldi5jb20vdGNzc28iOiI4ODc3NDYzNHw0ZDczMWRjODNiZTk5OThkOWE1MmUyOTA2OThmNGIwNGZiMmVjNjE1OTliODIxZmYxNjRjYWEzYzhhNmU3IiwiaHR0cHM6Ly90b3Bjb2Rlci1kZXYuY29tL2FjdGl2ZSI6dHJ1ZSwibmlja25hbWUiOiJpc2JpbGlyIiwibmFtZSI6ImVtcmUuaXNiaWxpckBnbWFpbC5jb20iLCJwaWN0dXJlIjoiaHR0cHM6Ly9zLmdyYXZhdGFyLmNvbS9hdmF0YXIvODE3NjNjMzE0ZGU0Y2ZiNGUxNDRhYzU3M2U1NmMxZjY_cz00ODAmcj1wZyZkPWh0dHBzJTNBJTJGJTJGY2RuLmF1dGgwLmNvbSUyRmF2YXRhcnMlMkZlbS5wbmciLCJ1cGRhdGVkX2F0IjoiMjAyMS0wNi0xOVQxNzowNjoyMi4yMzVaIiwiZW1haWwiOiJlbXJlLmlzYmlsaXJAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOnRydWUsImlzcyI6Imh0dHBzOi8vYXV0aC50b3Bjb2Rlci1kZXYuY29tLyIsInN1YiI6ImF1dGgwfDg4Nzc0NjM0IiwiYXVkIjoiQlhXWFVXbmlsVlVQZE4wMXQyU2UyOVR3MlpZTkdadkgiLCJpYXQiOjE2MjQxMjUzMzYsImV4cCI6MTYyNDEyODMzNiwibm9uY2UiOiJjVE5DTFVwRlpXMVJhMm94WkhSdE5WaGpVbk5IVkZGVFdWTjRiRzFCYVVaQ1dHZGpSVWhZVTB0RVZnPT0ifQ.SfKTYecx7A2qbqM3v8lJaC1GSdctNhkTx6laAhe2BJYVX5LdVL82ZM3_9yWqqZDPWHS9ku408Jt1DUMo5vRev34Av0iwJpYIT_4BbmMLeWQGQ3aRB78zp_emkZ5TE1vOnfSJvfsPoQoiLIwohyOUaDzz9MGdjrgYuSEAA1RGdjhVcamFlNNbR-lNMffnWYs0oWi89N5kgvv37JZjpDPAvQbotNT80Vs0JrLr1p71JLFcLFTQJ-bthFmt0922dj47-1MSjUQgOzFMN4JNjZKGtExyLGR7s_ipCQxg9lxHjMD-JNwg0liI20YGfTXZv9QQQ_K2jPkXiatHBQq_v2_Qjg", + "value": "", "enabled": true }, { "key": "invalid_token_1", - "value": "eyJ", + "value": "", "enabled": true }, { "key": "invalid_token_2", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90IiwiQ29ubmVjdCBTdXBwb3J0Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJHaG9zdGFyIiwiZXhwIjoxNTQ5ODAwMDc3LCJ1c2VySWQiOiIxNTE3NDMiLCJpYXQiOjE1NDk3OTk0NzcsImVtYWlsIjoiZW1haWxAZG9tYWluLmNvbS56IiwianRpIjoiMTJjMWMxMGItOTNlZi00NTMxLTgzMDUtYmE2NjVmYzRlMWI0In0.2n8k9pb16sE7LOLF_7mjAvEVKgggzS-wS3_8n2-R4RU", + "value": "", "enabled": true }, { @@ -29,7 +29,7 @@ }, { "key": "invalid_token_4", - "value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJjb3BpbG90IiwiQ29ubmVjdCBTdXBwb3J0Il0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJHaG9zdGFyIiwiZXhwIjoxNTQ5ODAwMDc3LCJ1c2VySWQiOiIxNTE3NDMiLCJpYXQiOjE1NDk3OTk0NzcsImVtYWlsIjoiZW1haWxAZG9tYWluLmNvbS56IiwianRpIjoiMTJjMWMxMGItOTNlZi00NTMxLTgzMDUtYmE2NjVmYzRlMWI0In0.2n8k9pb16sE7LOLF_7mjAvEVKgggzS-wS3_8n2-R4RU", + "value": "", "enabled": true } ], diff --git a/package-lock.json b/package-lock.json index eb8e5f2778..bd250b4344 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16760,8 +16760,8 @@ "dev": true }, "navigation-component": { - "version": "github:topcoder-platform/navigation-component#b44259da14c0452606cc5abe15f10eea7e31f0e5", - "from": "github:topcoder-platform/navigation-component#v1000.1.7", + "version": "github:topcoder-platform/navigation-component#27625999e94725fb31c226b8255a549849f1ebe4", + "from": "github:topcoder-platform/navigation-component#develop", "requires": { "classnames": "^2.2.6", "lodash": "^4.17.11", @@ -16772,9 +16772,9 @@ }, "dependencies": { "config": { - "version": "3.3.11", - "resolved": "https://registry.npmjs.org/config/-/config-3.3.11.tgz", - "integrity": "sha512-Dhn63ZoWCW5EMg4P0Sl/XNsj/7RLiUIA1x1npCy+m2cRwRHzLnt3UtYtxRDMZW/6oOMdWhCzaGYkOcajGgrAOA==", + "version": "3.3.12", + "resolved": "https://registry.npmjs.org/config/-/config-3.3.12.tgz", + "integrity": "sha512-Vmx389R/QVM3foxqBzXO8t2tUikYZP64Q6vQxGrsMpREeJc/aWRnPRERXWsYzOHAumx/AOoILWe6nU3ZJL+6Sw==", "requires": { "json5": "^2.2.3" } diff --git a/src/server/index.js b/src/server/index.js index d107dd1beb..393a72b9a7 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -28,7 +28,6 @@ import mailChimpRouter from './routes/mailchimp'; import mockDocuSignFactory from './__mocks__/docu-sign-mock'; import recruitCRMRouter from './routes/recruitCRM'; import mmLeaderboardRouter from './routes/mmLeaderboard'; -import growsurfRouter from './routes/growsurf'; import gSheetsRouter from './routes/gSheet'; import blogRouter from './routes/blog'; import feedsRouter from './routes/feeds'; @@ -247,7 +246,6 @@ async function onExpressJsSetup(server) { server.use('/api/mailchimp', mailChimpRouter); server.use('/api/recruit', recruitCRMRouter); server.use('/api/mml', mmLeaderboardRouter); - server.use('/api/growsurf', growsurfRouter); server.use('/api/gsheets', gSheetsRouter); server.use('/api/blog', blogRouter); server.use('/api/feeds', feedsRouter); diff --git a/src/server/routes/growsurf.js b/src/server/routes/growsurf.js deleted file mode 100644 index 298464e44e..0000000000 --- a/src/server/routes/growsurf.js +++ /dev/null @@ -1,27 +0,0 @@ -/** - * The routes related to Growsurf integration - */ - -import _ from 'lodash'; -import express from 'express'; -import { middleware } from 'tc-core-library-js'; -import config from 'config'; -import GrowsurfService from '../services/growsurf'; - -const cors = require('cors'); - -const authenticator = middleware.jwtAuthenticator; -const authenticatorOptions = _.pick(config.SECRET.JWT_AUTH, ['AUTH_SECRET', 'VALID_ISSUERS']); -const routes = express.Router(); - -// Enables CORS on those routes according config above -// ToDo configure CORS for set of our trusted domains -routes.use(cors()); -routes.options('*', cors()); - -routes.get('/participant/:emailOrId', (req, res) => new GrowsurfService().getParticipantController(req, res).then(res.send.bind(res))); -routes.get('/participants', (req, res) => new GrowsurfService().getParticipantsController(req, res).then(res.send.bind(res))); -routes.post('/participants', (req, res, next) => authenticator(authenticatorOptions)(req, res, next), (req, res) => new GrowsurfService().getOrCreateParticipantController(req, res).then(res.send.bind(res))); -routes.patch('/participant/:emailOrId', (req, res, next) => authenticator(authenticatorOptions)(req, res, next), (req, res) => new GrowsurfService().updateParticipantController(req, res).then(res.send.bind(res))); - -export default routes; diff --git a/src/server/services/growsurf.js b/src/server/services/growsurf.js deleted file mode 100644 index b9850e002c..0000000000 --- a/src/server/services/growsurf.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Server-side functions necessary for effective integration with growsurf - */ -import fetch from 'isomorphic-fetch'; -import config from 'config'; - -/** - * Auxiliary class that handles communication with growsurf - */ -export default class GrowsurfService { - /** - * Creates a new service instance. - * @param {String} baseUrl The base API endpoint. - */ - constructor(baseUrl = 'https://api.growsurf.com/v2') { - this.private = { - baseUrl, - apiKey: config.SECRET.GROWSURF_API_KEY, - authorization: `Bearer ${config.SECRET.GROWSURF_API_KEY}`, - }; - } - - /** - * Gets participant by email or id - * @return {Promise} - * @param {String} idOrEmail growsurf id or email - */ - async getParticipantByIdOREmail(idOrEmail) { - const response = await fetch(`${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${idOrEmail}`, { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - Authorization: this.private.authorization, - }, - }); - if (response.status >= 300) { - return { - error: await response.json(), - code: response.status, - url: `${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${idOrEmail}`, - }; - } - const data = await response.json(); - return data; - } - - /** - * Controller - Gets get participant by email or id - * @return {Promise} - * @param {Object} req the request. - * @param {Object} res the response. - */ - async getParticipantController(req, res) { - const { emailOrId } = req.params; - const growSurfData = await this.getParticipantByIdOREmail(emailOrId); - if (growSurfData.error) { - res.status(growSurfData.code); - } - return growSurfData; - } - - /** - * Controller - Gets get participants in the campaign - * @return {Promise} - * @param {Object} req the request. - * @param {Object} res the response. - */ - async getParticipantsController(req, res) { - const response = await fetch(`${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participants`, { - method: 'GET', - headers: { - 'Content-Type': 'application/json', - Authorization: this.private.authorization, - }, - }); - if (response.status >= 300) { - res.status(response.status); - return { - error: await response.json(), - code: response.status, - url: `${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participants`, - }; - } - const data = await response.json(); - return data; - } - - /** - * Add participant - * @return {Promise} - * @param {Object} body the request payload. - */ - async addParticipant(body) { - const response = await fetch(`${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: this.private.authorization, - }, - body, - }); - if (response.status >= 300) { - return { - error: await response.json(), - code: response.status, - url: `${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant`, - body, - }; - } - const data = await response.json(); - return data; - } - - /** - * Controller - Gets get participant by email or id - * if not exxists create it - * @return {Promise} - * @param {Object} req the request. - * @param {Object} res the response. - */ - async getOrCreateParticipantController(req, res) { - const { body } = req; - const result = await this.addParticipant(JSON.stringify({ - email: body.email, - firstName: body.firstName, - lastName: body.lastName, - metadata: { - tcHandle: body.tcHandle, - }, - })); - if (result.error) { - res.status(result.code); - } - return result; - } - - /** - * Update participant in growSurf - * @param {string} idOrEmail id or email - * @param {string} body payload - * @returns {Promise} - */ - async updateParticipant(idOrEmail, body) { - const response = await fetch(`${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${idOrEmail}`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json', - Authorization: this.private.authorization, - }, - body: JSON.stringify(body), - }); - if (response.status >= 300) { - return { - error: await response.json(), - code: response.status, - url: `${this.private.baseUrl}/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${idOrEmail}`, - body, - }; - } - const data = await response.json(); - return data; - } - - /** - * Controller - update participant in the system - * @param {Object} req request - * @param {Object} res respons - */ - async updateParticipantController(req, res) { - const { emailOrId } = req.params; - const updateGrowRes = await this.updateParticipant(emailOrId, req.body); - if (updateGrowRes.error) { - res.status(updateGrowRes.code); - } - return updateGrowRes; - } -} diff --git a/src/server/services/recruitCRM.js b/src/server/services/recruitCRM.js index 16edc366fe..87324ea2ba 100644 --- a/src/server/services/recruitCRM.js +++ b/src/server/services/recruitCRM.js @@ -7,7 +7,6 @@ import qs from 'qs'; import _ from 'lodash'; import { logger, services } from 'topcoder-react-lib'; import Joi from 'joi'; -import GrowsurfService from './growsurf'; import { sendEmailDirect } from './sendGrid'; // import GSheetService from './gSheet'; @@ -415,63 +414,10 @@ export default class RecruitCRMService { } let candidateSlug; let isNewCandidate = true; - let isReferred = false; - let referralCookie = req.cookies[config.GROWSURF_COOKIE]; - if (referralCookie) referralCookie = JSON.parse(referralCookie); - const tcHandle = _.findIndex(form.custom_fields, { field_id: 2 }); + const isReferred = false; let growRes; try { - // referral tracking via growsurf - if (referralCookie) { - const gs = new GrowsurfService(); - // check if candidate exists in growsurf - const existRes = await gs.getParticipantByIdOREmail(form.email); - if (existRes.id) { - // candidate exists in growsurf - // update candidate to set referrer only if it is not set already - if (!existRes.referrer) { - growRes = await gs.updateParticipant(form.email, { - referredBy: referralCookie.referralId, - referralStatus: 'CREDIT_PENDING', - metadata: { - gigID: id, - }, - }); - // add referral link to candidate profile in recruitCRM - if (!growRes.error) { - isReferred = true; - form.custom_fields.push({ - field_id: 6, value: `https://app.growsurf.com/dashboard/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${growRes.id}`, - }); - } else notifyKirilAndNick(growRes); - } - } else { - growRes = await gs.addParticipant(JSON.stringify({ - email: form.email, - referredBy: referralCookie.referralId, - referralStatus: 'CREDIT_PENDING', - firstName: form.first_name, - lastName: form.last_name, - metadata: { - gigId: id, - tcHandle: form.custom_fields[tcHandle].value, - }, - })); - // add referral link to candidate profile in recruitCRM - if (!growRes.error) { - isReferred = true; - form.custom_fields.push({ - field_id: 6, value: `https://app.growsurf.com/dashboard/campaign/${config.GROWSURF_CAMPAIGN_ID}/participant/${growRes.id}`, - }); - } else notifyKirilAndNick(growRes); - } - // finally, clear the cookie - res.cookie(config.GROWSURF_COOKIE, '', { - maxAge: 0, - overwrite: true, - }); - } - // Check if candidate exsits in the system? + // Check if candidate exists in the system? const candidateResponse = await fetch(`${this.private.baseUrl}/v1/candidates/search?email=${form.email}`, { method: 'GET', headers: { @@ -630,7 +576,6 @@ export default class RecruitCRMService { // form.email, // `https://app.recruitcrm.io/candidate/${candidateData.slug}`, // `https://topcoder.com/members/${form.custom_fields[tcHandle].value}`, - // `https://app.growsurf.com/dashboard/campaign/u9frbx/participant/${growRes.referrer.id}`, // `${growRes.referrer.firstName} ${growRes.referrer.lastName}`, // growRes.referrer.email, // `https://topcoder.com/members/${growRes.referrer.metadata.tcHandle}`, diff --git a/src/shared/components/Gigs/GigDetails/index.jsx b/src/shared/components/Gigs/GigDetails/index.jsx index b7bbd2a156..f6af7ac223 100644 --- a/src/shared/components/Gigs/GigDetails/index.jsx +++ b/src/shared/components/Gigs/GigDetails/index.jsx @@ -184,13 +184,4 @@ GigDetails.propTypes = { profile: PT.shape(), }; -function mapStateToProps(state) { - const { growSurf } = state; - return { - growSurf, - }; -} - -export default connect( - mapStateToProps, -)(GigDetails); +export default connect()(GigDetails); diff --git a/src/shared/containers/GigsPages/index.jsx b/src/shared/containers/GigsPages/index.jsx index bcb33d4a4e..5e5bd0431c 100644 --- a/src/shared/containers/GigsPages/index.jsx +++ b/src/shared/containers/GigsPages/index.jsx @@ -14,7 +14,6 @@ import { OptimizelyProvider, createInstance } from '@optimizely/react-sdk'; import { connect } from 'react-redux'; import _ from 'lodash'; import { v4 as uuidv4 } from 'uuid'; -import { getQuery } from 'utils/url'; import ChallengeTab from 'components/challenge-listing/ChallengeTab'; import './style.scss'; @@ -56,15 +55,6 @@ function GigsPagesContainer(props) { }); } } - // check for referral code in the URL and set it to cookie - if (isomorphy.isClientSide()) { - const query = getQuery(); - if (query.referralId) { - cookies.set(config.GROWSURF_COOKIE, JSON.stringify({ - referralId: query.referralId, - }), config.GROWSURF_COOKIE_SETTINGS); - } - } const { id, type } = match.params; const isApply = `${config.GIGS_PAGES_PATH}/${id}/apply` === match.url; const title = 'Find Freelance Work | Gigs | Topcoder';