Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
fix: stages are coming soon
Browse files Browse the repository at this point in the history
+ minor css stats card correction
  • Loading branch information
manuel-calavera authored and sunnygleason committed Sep 6, 2019
1 parent f564337 commit 9df14be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default makeStyles(theme => ({
lineHeight: 1.3,
fontWeight: 'bold',
color: getColor('main')(theme),
marginTop: 40,
marginTop: 35,
letterSpacing: 3.4,
},
},
Expand Down
19 changes: 11 additions & 8 deletions src/v2/components/TourDeSol/Stage.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @flow
import React from 'react';
import cn from 'classnames';
import format from 'date-fns/format';
import {eq, lt} from 'lodash/fp';
// import format from 'date-fns/format';
import {eq /*lt*/} from 'lodash/fp';
import {observer} from 'mobx-react-lite';
import {TDS_ACTIVE_STAGE} from 'v2/constants';
import iconRight from 'v2/assets/icons/arrow-right-dark.png';
// import iconRight from 'v2/assets/icons/arrow-right-dark.png';

type StageProps = {
className: string,
Expand All @@ -24,18 +24,21 @@ const Stage = ({className, activeClass, stage}: StageProps) => {
return null;
}
const isActive = eq(stage.id, TDS_ACTIVE_STAGE);
const isFinished = lt(stage.id, TDS_ACTIVE_STAGE);
const stageDateStart = format(new Date(stage.startDate), 'P');
const stageDateEnd = format(new Date(stage.endDate), 'P');
// const isFinished = lt(stage.id, TDS_ACTIVE_STAGE);
// const stageDateStart = format(new Date(stage.startDate), 'P');
// const stageDateEnd = format(new Date(stage.endDate), 'P');

return (
<li className={cn(className, isActive && activeClass)}>
<div>
{stage.title} {isActive && '(LIVE!)'}
{/* {stage.title} {isActive && '(LIVE!)'}
{isActive && <img src={iconRight} width={47} height={13} alt="" />}
<br />
{isFinished && <span>(finished {stageDateEnd})</span>}
{!isActive && !isFinished && <span>(coming {stageDateStart})</span>}
{!isActive && !isFinished && <span>(coming {stageDateStart})</span>} */}
{stage.title}
<br />
<span>(coming soon)</span>
</div>
</li>
);
Expand Down

0 comments on commit 9df14be

Please sign in to comment.