Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,15 +297,14 @@ workflows:
filters:
branches:
only:
- gig-tags
- free
# This is stage env for production QA releases
- "build-prod-staging":
context : org-global
filters:
branches:
only:
- develop
- nursoltan-s-issue-5490
- "approve-smoke-test-on-staging":
type: approval
requires:
Expand Down
Binary file removed src/assets/images/og_image.jpg
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
47 changes: 22 additions & 25 deletions src/shared/containers/challenge-detail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,22 @@ import { getService } from 'services/contentful';
// getRecommendedTags,
// } from 'utils/challenge-detail/helper';

import ogWireframe from
'../../../assets/images/open-graph/challenges/01-wireframe.jpg';
import ogUiDesign from
'../../../assets/images/open-graph/challenges/02-ui-design.jpg';
import ogUiPrototype from
'../../../assets/images/open-graph/challenges/03-ui-prototype.jpg';
'../../../assets/images/open-graph/challenges/02-Design-Preview.png';
import ogFirst2Finish from
'../../../assets/images/open-graph/challenges/04-first-2-finish.jpg';
'../../../assets/images/open-graph/challenges/09-First2Finish.png';
import ogDevelopment from
'../../../assets/images/open-graph/challenges/05-development.jpg';
'../../../assets/images/open-graph/challenges/03-Development.png';
import ogBigPrizesChallenge from
'../../../assets/images/open-graph/challenges/09-big-prizes-challenge.jpg';
import ogLuxChallenge from
'../../../assets/images/open-graph/challenges/10-lux-challenge.jpg';
import ogRuxChallenge from
'../../../assets/images/open-graph/challenges/11-rux-challenge.jpg';
import og24hUiPrototype from
'../../../assets/images/open-graph/challenges/12-24h-ui-prototype-challenge.jpg';
import og48hUiPrototype from
'../../../assets/images/open-graph/challenges/13-48h-ui-prototype-challenge.jpg';
'../../../assets/images/open-graph/challenges/06-Big-Prize.png';
import ogQAChallenge from
'../../../assets/images/open-graph/challenges/05-QA.png';
import ogDSChallenge from
'../../../assets/images/open-graph/challenges/04-Data-Science.png';

/* A fallback image, just in case we missed some corner case. */
import ogImage from
'../../../assets/images/og_image.jpg';
'../../../assets/images/social.png';

import './styles.scss';

Expand All @@ -88,9 +80,9 @@ const DAY = 24 * 60 * MIN;
*/
function getOgImage(challenge) {
const { legacy } = challenge;
const { track, subTrack } = legacy;
if (challenge.name.startsWith('LUX -')) return ogLuxChallenge;
if (challenge.name.startsWith('RUX -')) return ogRuxChallenge;
const { subTrack } = legacy;
if (challenge.name.startsWith('LUX -')) return ogBigPrizesChallenge;
if (challenge.name.startsWith('RUX -')) return ogBigPrizesChallenge;
if (challenge.prizes) {
const totalPrize = challenge.prizes.reduce((p, sum) => p + sum, 0);
if (totalPrize > 2500) return ogBigPrizesChallenge;
Expand All @@ -102,17 +94,22 @@ function getOgImage(challenge) {
const submission = (challenge.phases || [])
.find(p => p.name === CHALLENGE_PHASE_TYPES.SUBMISSION);
if (submission) {
if (submission.duration < 1.1 * DAY) return og24hUiPrototype;
if (submission.duration < 2.1 * DAY) return og48hUiPrototype;
if (submission.duration < 1.1 * DAY) return ogDevelopment;
if (submission.duration < 2.1 * DAY) return ogDevelopment;
}
return ogUiPrototype;
return ogDevelopment;
}
case SUBTRACKS.WIREFRAMES: return ogWireframe;
case SUBTRACKS.WIREFRAMES: return ogUiDesign;
case SUBTRACKS.QA:
case SUBTRACKS.TEST_SUITES:
return ogQAChallenge;
case SUBTRACKS.DS: return ogDSChallenge;
default:
}
switch (track) {
switch (challenge.track) {
case COMPETITION_TRACKS_V3.DEVELOP: return ogDevelopment;
case COMPETITION_TRACKS_V3.DESIGN: return ogUiDesign;
case COMPETITION_TRACKS_V3.DS: return ogDSChallenge;
default: return ogImage;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import MetaTags from 'components/MetaTags';
import { USER_GROUP_MAXAGE } from 'config';
import { updateChallengeType } from 'utils/challenge';

import ogImage from '../../../../assets/images/og_image.jpg';
import ogImage from '../../../../assets/images/social.png';
import style from './styles.scss';

// const { combine, mapToBackend } = challengeUtils.filter;
Expand Down
8 changes: 6 additions & 2 deletions src/shared/utils/tc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ export const CHALLENGE_PHASE_TYPES = {
*/

export const COMPETITION_TRACKS_V3 = {
DESIGN: 'DESIGN',
DEVELOP: 'DEVELOP',
DESIGN: 'Design',
DEVELOP: 'Development',
DS: 'Data Science',
};

/* Holds valid subtracks (only some of possible values are included into this
Expand All @@ -41,6 +42,9 @@ export const SUBTRACKS = {
FIRST_2_FINISH: 'FIRST_2_FINISH',
UI_PROTOTYPE_COMPETITION: 'UI_PROTOTYPE_COMPETITION',
WIREFRAMES: 'WIREFRAMES',
QA: 'BUG_HUNT',
TEST_SUITES: 'TEST_SUITES',
DS: 'DEVELOP_MARATHON_MATCH',
};

/**
Expand Down