File tree Expand file tree Collapse file tree
components/Activity/Hackathon Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import styles from './Hero.module.less';
66
77export interface CountdownProps {
88 countdownTo ?: string ;
9- label ?: string ;
109 unitLabels : string [ ] ;
1110}
1211
@@ -71,25 +70,21 @@ export class Countdown extends Component<CountdownProps> {
7170 }
7271
7372 render ( ) {
74- const { label , unitLabels } = this . props ;
73+ const { unitLabels } = this . props ;
7574 const { sections } = this ;
7675
7776 return (
78- < div className = { styles . countdownWrap } >
79- { label && < p className = { `${ styles . countdownLabel } m-0` } > { label } </ p > }
80-
81- < ol className = { `list-unstyled ${ styles . countdownGrid } m-0` } >
82- { sections . map ( ( value , index ) => (
83- < li
84- key = { `${ index } -${ unitLabels [ index ] } ` }
85- className = { `${ styles . countdownCell } d-flex flex-column justify-content-center align-items-center` }
86- >
87- < strong > { value } </ strong >
88- < span > { unitLabels [ index ] } </ span >
89- </ li >
90- ) ) }
91- </ ol >
92- </ div >
77+ < ol className = { `list-unstyled ${ styles . countdownGrid } m-0` } >
78+ { sections . map ( ( value , index ) => (
79+ < li
80+ key = { `${ index } -${ unitLabels [ index ] } ` }
81+ className = { `${ styles . countdownCell } d-flex flex-column justify-content-center align-items-center` }
82+ >
83+ < strong > { value } </ strong >
84+ < span > { unitLabels [ index ] } </ span >
85+ </ li >
86+ ) ) }
87+ </ ol >
9388 ) ;
9489 }
9590}
Original file line number Diff line number Diff line change @@ -161,11 +161,12 @@ export const HackathonHero: FC<HackathonHeroProps> = ({
161161 < p className = { styles . description } > { description } </ p >
162162
163163 { countdownTo && (
164- < Countdown
165- countdownTo = { countdownTo }
166- label = { countdownLabel }
167- unitLabels = { countdownUnitLabels }
168- />
164+ < div className = { styles . countdownWrap } >
165+ { countdownLabel && (
166+ < p className = { `${ styles . countdownLabel } m-0` } > { countdownLabel } </ p >
167+ ) }
168+ < Countdown countdownTo = { countdownTo } unitLabels = { countdownUnitLabels } />
169+ </ div >
169170 ) }
170171
171172 < nav className = "d-flex flex-wrap gap-2 gap-md-3" aria-label = { subtitle } >
You can’t perform that action at this time.
0 commit comments