@@ -9,7 +9,7 @@ export interface CarouselQuote {
99 text : string ;
1010 name : string ;
1111 title : string ;
12- company : string ;
12+ org : string ;
1313 logo ?: string ;
1414 link ?: string ;
1515}
@@ -19,7 +19,7 @@ export interface QuoteCarouselProps {
1919 overrides ?: {
2020 /** Companies pinned to the front in this order; rest are shuffled after */
2121 order ?: string [ ] ;
22- /** Override display names in the company strip */
22+ /** Override display names in the org strip */
2323 labels ?: Record < string , string > ;
2424 } ;
2525 /** Link to a page with all quotes */
@@ -38,27 +38,27 @@ function shuffleArray<T>(arr: T[]): T[] {
3838}
3939
4040interface CompanyEntry {
41- company : string ;
41+ org : string ;
4242 quote : CarouselQuote ;
4343}
4444
4545function buildCompanyQuotes ( quotes : CarouselQuote [ ] , order ?: string [ ] ) : CompanyEntry [ ] {
4646 const byCompany = new Map < string , CarouselQuote [ ] > ( ) ;
4747 for ( const q of quotes ) {
48- const list = byCompany . get ( q . company ) ;
48+ const list = byCompany . get ( q . org ) ;
4949 if ( list ) list . push ( q ) ;
50- else byCompany . set ( q . company , [ q ] ) ;
50+ else byCompany . set ( q . org , [ q ] ) ;
5151 }
52- const entries = [ ...byCompany . entries ( ) ] . map ( ( [ company , pool ] ) => ( {
53- company ,
52+ const entries = [ ...byCompany . entries ( ) ] . map ( ( [ org , pool ] ) => ( {
53+ org ,
5454 quote : pool [ Math . floor ( Math . random ( ) * pool . length ) ] ,
5555 } ) ) ;
5656 if ( order ?. length ) {
5757 const orderSet = new Set ( order ) ;
5858 const pinned = order
59- . map ( ( c ) => entries . find ( ( e ) => e . company === c ) )
59+ . map ( ( c ) => entries . find ( ( e ) => e . org === c ) )
6060 . filter ( ( e ) : e is CompanyEntry => ! ! e ) ;
61- const rest = shuffleArray ( entries . filter ( ( e ) => ! orderSet . has ( e . company ) ) ) ;
61+ const rest = shuffleArray ( entries . filter ( ( e ) => ! orderSet . has ( e . org ) ) ) ;
6262 return [ ...pinned , ...rest ] ;
6363 }
6464 return shuffleArray ( entries ) ;
@@ -71,7 +71,7 @@ function QuoteBlock({ quote }: { quote: CarouselQuote }) {
7171 “{ highlightBrand ( quote . text ) } ”
7272 </ p >
7373 < footer className = "mt-3 flex items-center gap-3" >
74- < CompanyLogo company = { quote . company } logo = { quote . logo } />
74+ < CompanyLogo org = { quote . org } logo = { quote . logo } />
7575 < div className = "h-12 w-0.5 bg-secondary dark:bg-primary" />
7676 < div className = "text-sm" >
7777 < span className = "font-semibold text-foreground" > { quote . name } </ span >
@@ -95,7 +95,7 @@ export function QuoteCarousel({
9595 const [ fading , setFading ] = useState ( false ) ;
9696 const timerRef = useRef < ReturnType < typeof setInterval > | null > ( null ) ;
9797
98- // Build shuffled company order on mount (client only)
98+ // Build shuffled org order on mount (client only)
9999 useEffect ( ( ) => {
100100 setEntries ( buildCompanyQuotes ( quotes , order ) ) ;
101101 } , [ quotes , order ] ) ;
@@ -136,10 +136,10 @@ export function QuoteCarousel({
136136 return (
137137 < div className = "flex flex-col gap-4" >
138138 { /* Company logo strip */ }
139- < div className = "flex flex-wrap items-center justify-evenly gap-x-4 gap-y-2 mx-4" >
139+ < div className = "flex flex-wrap items-center justify-evenly gap-x-6 gap-y-2 mx-4" >
140140 { entries . map ( ( e , i ) => (
141141 < button
142- key = { e . company }
142+ key = { e . org }
143143 type = "button"
144144 onClick = { ( ) => goTo ( i ) }
145145 className = { `text-xs font-semibold tracking-wide uppercase transition-opacity duration-200 ${
@@ -148,7 +148,7 @@ export function QuoteCarousel({
148148 : 'opacity-40 text-muted-foreground hover:opacity-70'
149149 } `}
150150 >
151- { labels [ e . company ] ?? e . company }
151+ { labels [ e . org ] ?? e . org }
152152 </ button >
153153 ) ) }
154154 </ div >
@@ -157,7 +157,7 @@ export function QuoteCarousel({
157157 < div className = "grid" >
158158 { entries . map ( ( e , i ) => (
159159 < div
160- key = { e . company }
160+ key = { e . org }
161161 className = { `col-start-1 row-start-1 transition-opacity duration-300 ease-in-out ${
162162 i === activeIndex && ! fading ? 'opacity-100' : 'opacity-0'
163163 } `}
0 commit comments