diff --git a/components/Activity/Hackathon/ActionHub.tsx b/components/Activity/Hackathon/ActionHub.tsx index b471a8b..2e1e5a1 100644 --- a/components/Activity/Hackathon/ActionHub.tsx +++ b/components/Activity/Hackathon/ActionHub.tsx @@ -1,4 +1,4 @@ -import type { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren, ReactNode } from 'react'; import { Col, Container, Row } from 'react-bootstrap'; import { HackathonHeroAction } from './Hero'; @@ -14,7 +14,7 @@ export interface HackathonActionHubEntry { export interface HackathonActionHubProps { entries: HackathonActionHubEntry[]; - facts: string[]; + facts: ReactNode[]; primaryAction?: HackathonHeroAction; primaryDescription: string; primaryTitle: string; @@ -90,8 +90,8 @@ export const HackathonActionHub: FC> diff --git a/components/Activity/Hackathon/AgendaCountdown.module.less b/components/Activity/Hackathon/AgendaCountdown.module.less index 8d12cf9..3861a84 100644 --- a/components/Activity/Hackathon/AgendaCountdown.module.less +++ b/components/Activity/Hackathon/AgendaCountdown.module.less @@ -20,7 +20,7 @@ grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; - li { + .item { gap: 0.7rem; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), diff --git a/components/Activity/Hackathon/AgendaCountdown.tsx b/components/Activity/Hackathon/AgendaCountdown.tsx index 7b69487..92ed0d4 100644 --- a/components/Activity/Hackathon/AgendaCountdown.tsx +++ b/components/Activity/Hackathon/AgendaCountdown.tsx @@ -1,10 +1,10 @@ import { TableCellValue } from 'mobx-lark'; import { observer } from 'mobx-react'; import { FC, useContext, useState } from 'react'; +import { Countdown, TimeUnit } from 'idea-react'; import { Agenda } from '../../../models/Hackathon'; import { I18nContext } from '../../../models/Translation'; -import { Countdown, TimeUnit } from '../../Base/Countdown'; import styles from './AgendaCountdown.module.less'; import { agendaTypeLabelOf, resolveCountdownState } from './utility'; @@ -15,7 +15,7 @@ export interface AgendaCountdownProps { units: TimeUnit[]; } -export const AgendaCountdown: FC = observer( +const AgendaCountdown: FC = observer( ({ agendaItems, endTime, startTime, units }) => { const { t } = useContext(I18nContext); const [referenceTime, setReferenceTime] = useState(Date.now()); @@ -38,6 +38,7 @@ export const AgendaCountdown: FC = observer( setReferenceTime(Date.now())} units={units} @@ -46,3 +47,4 @@ export const AgendaCountdown: FC = observer( ); }, ); +export default AgendaCountdown; diff --git a/components/Activity/Hackathon/Hero.tsx b/components/Activity/Hackathon/Hero.tsx index 60495fb..c64c1f9 100644 --- a/components/Activity/Hackathon/Hero.tsx +++ b/components/Activity/Hackathon/Hero.tsx @@ -1,13 +1,15 @@ import { TableCellValue } from 'mobx-lark'; -import { FC } from 'react'; +import dynamic from 'next/dynamic'; +import { FC, ReactNode } from 'react'; import { Container } from 'react-bootstrap'; +import { TimeUnit } from 'idea-react'; import { Agenda } from '../../../models/Hackathon'; import { LarkImage } from '../../LarkImage'; -import { AgendaCountdown } from './AgendaCountdown'; -import { TimeUnit } from '../../Base/Countdown'; import styles from './Hero.module.less'; +const AgendaCountdown = dynamic(() => import('./AgendaCountdown'), { ssr: false }); + export type HackathonHeroNavItem = Record<'label' | 'href', string>; export interface HackathonHeroAction extends HackathonHeroNavItem { @@ -26,9 +28,9 @@ export interface HackathonHeroProps extends Record< string > { agendaItems: Agenda[]; - badges: string[]; + badges: ReactNode[]; bottomCard?: HackathonHeroCard; - chips?: string[]; + chips?: ReactNode[]; countdownUnits: TimeUnit[]; endTime?: TableCellValue; image?: TableCellValue; @@ -148,7 +150,7 @@ export const HackathonHero: FC = ({