Skip to content

Commit 54ad401

Browse files
authored
add more quotes (#39)
* rename company to org, use initials for fallback logo, round fallback circle * add Firmus quote from Tim Rosenfield * add DatologyAI quote from Matthew Leavitt * add Stas Bekman quote
1 parent 590db98 commit 54ad401

7 files changed

Lines changed: 94 additions & 47 deletions

File tree

Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 17 additions & 0 deletions
Loading

packages/app/src/components/page-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ export function PageContent({ initialTab = 'inference' }: { initialTab?: string
303303
<div className="mt-4 pt-4 border-t border-border/50">
304304
<QuoteCarousel
305305
quotes={QUOTES.filter(
306-
(q) => !['NVIDIA', 'AMD', 'Supermicro', 'Vultr'].includes(q.company),
306+
(q) => !['NVIDIA', 'AMD', 'Supermicro', 'Vultr'].includes(q.org),
307307
)}
308308
overrides={{
309309
order: ['OpenAI'],

packages/app/src/components/quote-carousel.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -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

4040
interface CompanyEntry {
41-
company: string;
41+
org: string;
4242
quote: CarouselQuote;
4343
}
4444

4545
function 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
&ldquo;{highlightBrand(quote.text)}&rdquo;
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
}`}

packages/app/src/components/quotes/quote-utils.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,26 @@
22

33
import { useState } from 'react';
44

5-
export function CompanyLogo({ company, logo }: { company: string; logo?: string }) {
5+
export function CompanyLogo({ org, logo }: { org: string; logo?: string }) {
66
const [failed, setFailed] = useState(false);
77

88
if (!logo || failed) {
99
return (
10-
<div className="h-12 shrink-0 rounded-full bg-muted flex items-center justify-center px-3">
11-
<span className="text-xs font-bold text-muted-foreground">{company[0]}</span>
10+
<div className="size-10 shrink-0 rounded-full bg-muted flex items-center justify-center">
11+
<span className="text-sm font-bold text-muted-foreground">
12+
{org
13+
.split(' ')
14+
.map((w) => w[0])
15+
.join('')}
16+
</span>
1217
</div>
1318
);
1419
}
1520

1621
return (
1722
<img
1823
src={`/logos/${logo}`}
19-
alt={company}
24+
alt={org}
2025
className="h-10 min-w-10 max-w-20 shrink-0 object-contain grayscale opacity-70 dark:invert"
2126
onError={() => setFailed(true)}
2227
/>

packages/app/src/components/quotes/quotes-content.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ function QuoteCard({
99
text,
1010
name,
1111
title,
12-
company,
12+
org,
1313
logo,
1414
link,
1515
}: {
1616
text: string;
1717
name: string;
1818
title: string;
19-
company: string;
19+
org: string;
2020
logo?: string;
2121
link?: string;
2222
}) {
@@ -26,7 +26,7 @@ function QuoteCard({
2626
&ldquo;{highlightBrand(text)}&rdquo;
2727
</p>
2828
<footer className="flex items-center gap-3">
29-
<CompanyLogo company={company} logo={logo} />
29+
<CompanyLogo org={org} logo={logo} />
3030
<div className="h-12 w-0.5 bg-secondary dark:bg-primary" />
3131
<div className="text-sm">
3232
<span className="font-semibold text-foreground">{name}</span>
@@ -75,7 +75,7 @@ export function QuotesContent() {
7575
text={quote.text}
7676
name={quote.name}
7777
title={quote.title}
78-
company={quote.company}
78+
org={quote.org}
7979
logo={quote.logo}
8080
link={quote.link}
8181
/>

0 commit comments

Comments
 (0)