@@ -49,30 +49,22 @@ import { getService } from 'services/contentful';
49
49
// getRecommendedTags,
50
50
// } from 'utils/challenge-detail/helper';
51
51
52
- import ogWireframe from
53
- '../../../assets/images/open-graph/challenges/01-wireframe.jpg' ;
54
52
import ogUiDesign from
55
- '../../../assets/images/open-graph/challenges/02-ui-design.jpg' ;
56
- import ogUiPrototype from
57
- '../../../assets/images/open-graph/challenges/03-ui-prototype.jpg' ;
53
+ '../../../assets/images/open-graph/challenges/02-Design-Preview.png' ;
58
54
import ogFirst2Finish from
59
- '../../../assets/images/open-graph/challenges/04-first-2-finish.jpg ' ;
55
+ '../../../assets/images/open-graph/challenges/09-First2Finish.png ' ;
60
56
import ogDevelopment from
61
- '../../../assets/images/open-graph/challenges/05-development.jpg ' ;
57
+ '../../../assets/images/open-graph/challenges/03-Development.png ' ;
62
58
import ogBigPrizesChallenge from
63
- '../../../assets/images/open-graph/challenges/09-big-prizes-challenge.jpg' ;
64
- import ogLuxChallenge from
65
- '../../../assets/images/open-graph/challenges/10-lux-challenge.jpg' ;
66
- import ogRuxChallenge from
67
- '../../../assets/images/open-graph/challenges/11-rux-challenge.jpg' ;
68
- import og24hUiPrototype from
69
- '../../../assets/images/open-graph/challenges/12-24h-ui-prototype-challenge.jpg' ;
70
- import og48hUiPrototype from
71
- '../../../assets/images/open-graph/challenges/13-48h-ui-prototype-challenge.jpg' ;
59
+ '../../../assets/images/open-graph/challenges/06-Big-Prize.png' ;
60
+ import ogQAChallenge from
61
+ '../../../assets/images/open-graph/challenges/05-QA.png' ;
62
+ import ogDSChallenge from
63
+ '../../../assets/images/open-graph/challenges/04-Data-Science.png' ;
72
64
73
65
/* A fallback image, just in case we missed some corner case. */
74
66
import ogImage from
75
- '../../../assets/images/og_image.jpg ' ;
67
+ '../../../assets/images/social.png ' ;
76
68
77
69
import './styles.scss' ;
78
70
@@ -89,8 +81,8 @@ const DAY = 24 * 60 * MIN;
89
81
function getOgImage ( challenge ) {
90
82
const { legacy } = challenge ;
91
83
const { track, subTrack } = legacy ;
92
- if ( challenge . name . startsWith ( 'LUX -' ) ) return ogLuxChallenge ;
93
- if ( challenge . name . startsWith ( 'RUX -' ) ) return ogRuxChallenge ;
84
+ if ( challenge . name . startsWith ( 'LUX -' ) ) return ogBigPrizesChallenge ;
85
+ if ( challenge . name . startsWith ( 'RUX -' ) ) return ogBigPrizesChallenge ;
94
86
if ( challenge . prizes ) {
95
87
const totalPrize = challenge . prizes . reduce ( ( p , sum ) => p + sum , 0 ) ;
96
88
if ( totalPrize > 2500 ) return ogBigPrizesChallenge ;
@@ -102,12 +94,14 @@ function getOgImage(challenge) {
102
94
const submission = ( challenge . phases || [ ] )
103
95
. find ( p => p . name === CHALLENGE_PHASE_TYPES . SUBMISSION ) ;
104
96
if ( submission ) {
105
- if ( submission . duration < 1.1 * DAY ) return og24hUiPrototype ;
106
- if ( submission . duration < 2.1 * DAY ) return og48hUiPrototype ;
97
+ if ( submission . duration < 1.1 * DAY ) return ogDevelopment ;
98
+ if ( submission . duration < 2.1 * DAY ) return ogDevelopment ;
107
99
}
108
- return ogUiPrototype ;
100
+ return ogDevelopment ;
109
101
}
110
- case SUBTRACKS . WIREFRAMES : return ogWireframe ;
102
+ case SUBTRACKS . WIREFRAMES : return ogUiDesign ;
103
+ case SUBTRACKS . QA : return ogQAChallenge ;
104
+ case SUBTRACKS . DS : return ogDSChallenge ;
111
105
default :
112
106
}
113
107
switch ( track ) {
0 commit comments