Skip to content

Commit d40e4aa

Browse files
committed
Compress timeline view
#6807
1 parent a19c59a commit d40e4aa

File tree

4 files changed

+11
-7
lines changed
  • __tests__/shared/components/challenge-detail/Submissions/SubmissionRow/SubmissionHistoryRow/__snapshots__
  • src/shared

4 files changed

+11
-7
lines changed

__tests__/shared/components/challenge-detail/Submissions/SubmissionRow/SubmissionHistoryRow/__snapshots__/index.jsx.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ exports[`Matches shallow shapshot shapshot 1 1`] = `
5454
<div>
5555
06 Nov 2017
5656
57-
15:49:35
57+
22:49:35
5858
</div>
5959
</div>
6060
<div

src/shared/components/challenge-detail/Header/index.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { isMM } from 'utils/challenge';
1212

1313
import PT from 'prop-types';
1414
import React from 'react';
15-
import { useMediaQuery } from 'react-responsive';
1615
import { PrimaryButton } from 'topcoder-react-ui-kit';
1716
import { Link } from 'topcoder-react-utils';
1817
import { COMPETITION_TRACKS } from 'utils/tc';
@@ -81,9 +80,7 @@ export default function ChallengeHeader(props) {
8180
type,
8281
track,
8382
} = challenge;
84-
85-
const desktop = useMediaQuery({ minWidth: 1024 });
86-
const showDeadlineDetail = desktop || showDeadlineDetailProp;
83+
const showDeadlineDetail = showDeadlineDetailProp;
8784

8885
const tags = challenge.tags || [];
8986

@@ -172,6 +169,12 @@ export default function ChallengeHeader(props) {
172169
const end = phaseEndDate(phase);
173170
return moment(end).isAfter();
174171
}
172+
// do not show [Specification Submission, Specification Review, Approval]
173+
// phases for design challenges
174+
if (trackLower === 'design'
175+
&& ['Specification Submission', 'Specification Review', 'Approval'].indexOf(phase.name) >= 0) {
176+
return false;
177+
}
175178
return true;
176179
});
177180

src/shared/components/challenge-detail/Header/style.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,14 @@
644644
height: 60px;
645645
border-bottom-left-radius: 8px;
646646
border-bottom-right-radius: 8px;
647+
display: flex;
648+
padding-right: 16px;
647649

648650
&.opened {
649651
border-radius: 0 !important;
650652
}
651653

652654
@include xs-to-md {
653-
display: flex;
654655
padding: 0 16px;
655656
}
656657

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class ChallengeDetailPageContainer extends React.Component {
155155
this.apiService = getService({ spaceName: 'EDU' });
156156
this.state = {
157157
thriveArticles: [],
158-
showDeadlineDetail: true,
158+
showDeadlineDetail: false,
159159
registrantsSort: {
160160
field: '',
161161
sort: '',

0 commit comments

Comments
 (0)