File tree Expand file tree Collapse file tree 10 files changed +21
-13
lines changed
__tests__/shared/components
ProfilePage/__snapshots__
challenge-listing/Tooltips/ProgressBarTooltip Expand file tree Collapse file tree 10 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ workflows:
230
230
filters :
231
231
branches :
232
232
only :
233
+ - milestone-20200924
233
234
- develop
234
235
# This is alternate dev env for parallel testing
235
236
- " build-test " :
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ exports[`Default render 1`] = `
118
118
},
119
119
Object {
120
120
" href" : " https://www.topcoder-dev.com/blog" ,
121
+ " openNewTab" : true ,
121
122
" title" : " Blog" ,
122
123
},
123
124
Object {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ exports[`renders a full Profile correctly 1`] = `
58
58
}
59
59
onShowBadges = { [Function ]}
60
60
showBadgesButton = { true }
61
- wins = { 3 }
61
+ wins = { 0 }
62
62
/>
63
63
</div >
64
64
</Sticky >
Original file line number Diff line number Diff line change @@ -370,6 +370,7 @@ module.exports = {
370
370
{
371
371
title : 'Blog' ,
372
372
href : 'https://www.topcoder-dev.com/blog' ,
373
+ openNewTab : true ,
373
374
} ,
374
375
{
375
376
title : 'Thrive' ,
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ module.exports = {
171
171
{
172
172
title : 'Blog' ,
173
173
href : 'https://www.topcoder.com/blog' ,
174
+ openNewTab : true ,
174
175
} ,
175
176
{
176
177
title : 'Thrive' ,
Original file line number Diff line number Diff line change 138
138
"tc-core-library-js" : " github:appirio-tech/tc-core-library-js#v2.6.3" ,
139
139
"tc-ui" : " ^1.0.12" ,
140
140
"topcoder-react-lib" : " 1000.22.7" ,
141
- "topcoder-react-ui-kit" : " 2.0 .0" ,
141
+ "topcoder-react-ui-kit" : " 1000.1 .0" ,
142
142
"topcoder-react-utils" : " 0.7.8" ,
143
143
"turndown" : " ^4.0.2" ,
144
144
"url-parse" : " ^1.4.1" ,
Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ class ProfilePage extends React.Component {
192
192
info = { info }
193
193
onShowBadges = { ( ) => this . setState ( { badgesModalOpen : true } ) }
194
194
showBadgesButton = { achievements && achievements . length > 0 }
195
- wins = { _ . get ( stats , 'wins' , 0 ) }
195
+ wins = { _ . get ( ( stats && stats [ 0 ] ) || { } , 'wins' , 0 ) }
196
196
/>
197
197
</ div >
198
198
</ Sticky >
Original file line number Diff line number Diff line change @@ -97,17 +97,17 @@ function Tip(props) {
97
97
98
98
const allPhases = c . phases || [ ] ;
99
99
const endPhaseDate = Math . max ( ...allPhases . map ( d => phaseEndDate ( d ) ) ) ;
100
- const registrationPhase = allPhases . find ( phase => phase . name === 'Registration' ) ;
101
- const submissionPhase = allPhases . find ( phase => phase . name === 'Submission' ) ;
102
- const checkpointPhase = allPhases . find ( phase => phase . name === 'Checkpoint Submission' ) ;
100
+ const registrationPhase = allPhases . find ( phase => phase . name === 'Registration' ) || { } ;
101
+ const submissionPhase = allPhases . find ( phase => phase . name === 'Submission' ) || { } ;
102
+ const checkpointPhase = allPhases . find ( phase => phase . name === 'Checkpoint Submission' ) || { } ;
103
103
104
- if ( registrationPhase ) {
104
+ if ( ! _ . isEmpty ( registrationPhase ) ) {
105
105
steps . push ( {
106
106
date : phaseStartDate ( registrationPhase ) ,
107
107
name : 'Start' ,
108
108
} ) ;
109
109
}
110
- if ( checkpointPhase ) {
110
+ if ( ! _ . isEmpty ( checkpointPhase ) ) {
111
111
steps . push ( {
112
112
date : phaseEndDate ( checkpointPhase ) ,
113
113
name : 'Checkpoint' ,
@@ -119,7 +119,7 @@ function Tip(props) {
119
119
date : phaseEndDate ( iterativeReviewPhase ) ,
120
120
name : 'Iterative Review' ,
121
121
} ) ;
122
- } else if ( submissionPhase ) {
122
+ } else if ( ! _ . isEmpty ( submissionPhase ) ) {
123
123
steps . push ( {
124
124
date : phaseEndDate ( submissionPhase ) ,
125
125
name : 'Submission' ,
Original file line number Diff line number Diff line change @@ -95,6 +95,10 @@ function Routes({ communityId }) {
95
95
component = { ( ) => < TrackHomePages base = "/community" /> }
96
96
path = "/community/(competitive-programming|data-science|design|development|qa)/how-to-compete"
97
97
/>
98
+ < Redirect
99
+ from = "/community/gigs"
100
+ to = "/gigs"
101
+ />
98
102
< Route
99
103
component = { PolicyPages }
100
104
exact
Original file line number Diff line number Diff line change 3
3
*/
4
4
5
5
import moment from 'moment' ;
6
- import { find , sumBy } from 'lodash' ;
6
+ import { find , sumBy , isEmpty } from 'lodash' ;
7
7
import { phaseStartDate , phaseEndDate } from './helper' ;
8
8
9
9
export const SORTS = {
@@ -56,10 +56,10 @@ export default {
56
56
const getChallengeStartDate = ( challenge ) => {
57
57
// extract the phases from `challenge.phases`,
58
58
// as `challenge.registrationStartDate` returned from API is not reliable
59
- const registrationPhase = find ( challenge . phases , p => p . name === 'Registration' ) ;
60
- const submissionPhase = find ( challenge . phases , p => p . name === 'Submission' ) ;
59
+ const registrationPhase = find ( challenge . phases , p => p . name === 'Registration' ) || { } ;
60
+ const submissionPhase = find ( challenge . phases , p => p . name === 'Submission' ) || { } ;
61
61
// registration phase exists
62
- if ( registrationPhase ) {
62
+ if ( ! isEmpty ( registrationPhase ) ) {
63
63
return moment ( phaseStartDate ( registrationPhase ) ) ;
64
64
}
65
65
// registration phase doesnt exist, This is possibly a F2F or TSK. Take submission phase
You can’t perform that action at this time.
0 commit comments