File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import React from 'react';
14
14
import { connect } from 'react-redux' ;
15
15
import { getSalaryType , getCustomField } from 'utils/gigs' ;
16
16
import IconBlackLocation from 'assets/images/icon-black-location.svg' ;
17
- import { config , Link } from 'topcoder-react-utils' ;
17
+ import { config , Link , isomorphy } from 'topcoder-react-utils' ;
18
18
import { getQuery , updateQuery } from 'utils/url' ;
19
19
import { withOptimizely } from '@optimizely/react-sdk' ;
20
20
import './jobLisingStyles.scss' ;
@@ -149,7 +149,10 @@ class RecruitCRMJobsContainer extends React.Component {
149
149
}
150
150
151
151
// optimizely decide
152
- const decision = optimizely . decide ( 'gig_listing_hotlist' ) ;
152
+ let decision = { enabled : true } ;
153
+ if ( isomorphy . isClientSide ( ) ) {
154
+ decision = optimizely . decide ( 'gig_listing_hotlist' ) ;
155
+ }
153
156
let jobsToDisplay = jobs ;
154
157
// build hotlist of jobs if present
155
158
let hotlistJobs = _ . filter ( jobs , ( job ) => {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ function GigsPagesContainer(props) {
30
30
optProfile . attributes . TC_Handle = profile . handle ;
31
31
optProfile . attributes . HomeCountryCode = profile . homeCountryCode ;
32
32
optProfile . attributes . email = profile . email ;
33
- } else {
33
+ } else if ( isomorphy . isClientSide ( ) ) {
34
34
const idCookie = cookies . get ( '_tc.aid' ) ;
35
35
if ( idCookie ) {
36
36
optProfile . id = JSON . parse ( idCookie ) . aid ;
@@ -86,11 +86,16 @@ window._chatlio = window._chatlio||[];
86
86
</ div >
87
87
) ;
88
88
89
- return isomorphy . isClientSide ( ) ? (
90
- < OptimizelyProvider optimizely = { optimizelyClient } user = { optProfile } timeout = { 500 } >
89
+ return (
90
+ < OptimizelyProvider
91
+ optimizely = { optimizelyClient }
92
+ user = { optProfile }
93
+ timeout = { 500 }
94
+ isServerSide = { isomorphy . isClientSide ( ) }
95
+ >
91
96
{ inner }
92
97
</ OptimizelyProvider >
93
- ) : inner ;
98
+ ) ;
94
99
}
95
100
96
101
GigsPagesContainer . defaultProps = {
You can’t perform that action at this time.
0 commit comments