Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit dbc9f8c

Browse files
committedApr 28, 2021
for #5447
1 parent e64a2b4 commit dbc9f8c

23 files changed

+20
-24
lines changed
 

‎src/assets/images/og_image.jpg

-16.6 KB
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

‎src/shared/containers/challenge-detail/index.jsx

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,22 @@ import { getService } from 'services/contentful';
4949
// getRecommendedTags,
5050
// } from 'utils/challenge-detail/helper';
5151

52-
import ogWireframe from
53-
'../../../assets/images/open-graph/challenges/01-wireframe.jpg';
5452
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';
5854
import ogFirst2Finish from
59-
'../../../assets/images/open-graph/challenges/04-first-2-finish.jpg';
55+
'../../../assets/images/open-graph/challenges/09-First2Finish.png';
6056
import ogDevelopment from
61-
'../../../assets/images/open-graph/challenges/05-development.jpg';
57+
'../../../assets/images/open-graph/challenges/03-Development.png';
6258
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';
7264

7365
/* A fallback image, just in case we missed some corner case. */
7466
import ogImage from
75-
'../../../assets/images/og_image.jpg';
67+
'../../../assets/images/social.png';
7668

7769
import './styles.scss';
7870

@@ -89,8 +81,8 @@ const DAY = 24 * 60 * MIN;
8981
function getOgImage(challenge) {
9082
const { legacy } = challenge;
9183
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;
9486
if (challenge.prizes) {
9587
const totalPrize = challenge.prizes.reduce((p, sum) => p + sum, 0);
9688
if (totalPrize > 2500) return ogBigPrizesChallenge;
@@ -102,12 +94,14 @@ function getOgImage(challenge) {
10294
const submission = (challenge.phases || [])
10395
.find(p => p.name === CHALLENGE_PHASE_TYPES.SUBMISSION);
10496
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;
10799
}
108-
return ogUiPrototype;
100+
return ogDevelopment;
109101
}
110-
case SUBTRACKS.WIREFRAMES: return ogWireframe;
102+
case SUBTRACKS.WIREFRAMES: return ogUiDesign;
103+
case SUBTRACKS.QA: return ogQAChallenge;
104+
case SUBTRACKS.DS: return ogDSChallenge;
111105
default:
112106
}
113107
switch (track) {

‎src/shared/containers/challenge-listing/Listing/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import MetaTags from 'components/MetaTags';
3131
import { USER_GROUP_MAXAGE } from 'config';
3232
import { updateChallengeType } from 'utils/challenge';
3333

34-
import ogImage from '../../../../assets/images/og_image.jpg';
34+
import ogImage from '../../../../assets/images/social.png';
3535
import style from './styles.scss';
3636

3737
// const { combine, mapToBackend } = challengeUtils.filter;

‎src/shared/utils/tc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const SUBTRACKS = {
4141
FIRST_2_FINISH: 'FIRST_2_FINISH',
4242
UI_PROTOTYPE_COMPETITION: 'UI_PROTOTYPE_COMPETITION',
4343
WIREFRAMES: 'WIREFRAMES',
44+
QA: 'Quality Assurance',
45+
DS: 'Data Science',
4446
};
4547

4648
/**

0 commit comments

Comments
 (0)
Please sign in to comment.