1- import { FC } from 'react' ;
1+ import { FC , type PropsWithChildren } from 'react' ;
22import { Col , Container , Row } from 'react-bootstrap' ;
33
44import { HackathonHeroAction } from './HackathonHero' ;
@@ -18,25 +18,29 @@ export interface HackathonActionHubProps {
1818 primaryAction ?: HackathonHeroAction ;
1919 primaryDescription : string ;
2020 primaryTitle : string ;
21- secondaryAction : HackathonHeroAction ;
2221 subtitle : string ;
2322 title : string ;
2423}
2524
26- const ActionHubLink : FC < { action : HackathonHeroAction ; variant : 'ghost' | 'primary' } > = ( {
27- action,
28- variant,
29- } ) => (
25+ export const HackathonActionHubLink : FC < {
26+ action : HackathonHeroAction ;
27+ variant : 'ghost' | 'primary' ;
28+ } > = ( { action , variant } ) => (
3029 < a
31- className = { variant === 'primary' ? styles . actionButton : styles . actionButtonGhost }
30+ className = {
31+ variant === 'primary' ? styles . actionButton : styles . actionButtonGhost
32+ }
3233 href = { action . href }
3334 { ...( action . external && { target : '_blank' , rel : 'noreferrer' } ) }
3435 >
3536 { action . label }
3637 </ a >
3738) ;
3839
39- const ActionEntryCard : FC < { entry : HackathonActionHubEntry ; step : string } > = ( { entry, step } ) => (
40+ const ActionEntryCard : FC < { entry : HackathonActionHubEntry ; step : string } > = ( {
41+ entry,
42+ step,
43+ } ) => (
4044 < article className = { styles . entryCard } >
4145 < span className = { styles . entryStep } >
4246 { step } · { entry . eyebrow }
@@ -50,7 +54,7 @@ const ActionEntryCard: FC<{ entry: HackathonActionHubEntry; step: string }> = ({
5054 </ div >
5155
5256 < nav className = { styles . entryLinks } aria-label = { entry . title } >
53- { entry . links . map ( link => (
57+ { entry . links . map ( ( link ) => (
5458 < a
5559 key = { `${ link . label } -${ link . href } ` }
5660 className = { styles . entryLink }
@@ -64,13 +68,15 @@ const ActionEntryCard: FC<{ entry: HackathonActionHubEntry; step: string }> = ({
6468 </ article >
6569) ;
6670
67- export const HackathonActionHub : FC < HackathonActionHubProps > = ( {
71+ export const HackathonActionHub : FC <
72+ PropsWithChildren < HackathonActionHubProps >
73+ > = ( {
74+ children,
6875 entries,
6976 facts,
7077 primaryAction,
7178 primaryDescription,
7279 primaryTitle,
73- secondaryAction,
7480 subtitle,
7581 title,
7682} ) => (
@@ -84,12 +90,17 @@ export const HackathonActionHub: FC<HackathonActionHubProps> = ({
8490 < p className = { styles . regDesc } > { primaryDescription } </ p >
8591
8692 < nav className = { styles . regActions } aria-label = { title } >
87- { primaryAction && < ActionHubLink action = { primaryAction } variant = "primary" /> }
88- < ActionHubLink action = { secondaryAction } variant = "ghost" />
93+ { primaryAction && (
94+ < HackathonActionHubLink
95+ action = { primaryAction }
96+ variant = "primary"
97+ />
98+ ) }
99+ { children }
89100 </ nav >
90101
91102 < ul className = { `list-unstyled ${ styles . regFacts } ` } >
92- { facts . map ( fact => (
103+ { facts . map ( ( fact ) => (
93104 < li key = { fact } > { fact } </ li >
94105 ) ) }
95106 </ ul >
@@ -105,7 +116,10 @@ export const HackathonActionHub: FC<HackathonActionHubProps> = ({
105116 < Row as = "ol" className = "list-unstyled g-3 mb-0" >
106117 { entries . map ( ( entry , index ) => (
107118 < Col as = "li" key = { entry . title } md = { 6 } >
108- < ActionEntryCard entry = { entry } step = { String ( index + 1 ) . padStart ( 2 , '0' ) } />
119+ < ActionEntryCard
120+ entry = { entry }
121+ step = { String ( index + 1 ) . padStart ( 2 , '0' ) }
122+ />
109123 </ Col >
110124 ) ) }
111125 </ Row >
0 commit comments