Skip to content

Commit bf526a1

Browse files
committed
feat: Remove schedule CTA from EventsCarousel and related components
1 parent e3e752b commit bf526a1

5 files changed

Lines changed: 19 additions & 54 deletions

File tree

apps/breakpoint/src/components/sections/EventsCarousel.tsx

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { getAnchorLinkProps } from "@/lib/links";
1111

1212
interface EventsCarouselProps {
1313
headline: string;
14-
scheduleCta: string;
1514
communityCta: string;
1615
items: HighlightedEvent[];
1716
}
@@ -73,7 +72,6 @@ function formatEventMeta(
7372

7473
export default function EventsCarousel({
7574
headline,
76-
scheduleCta,
7775
communityCta,
7876
items,
7977
}: EventsCarouselProps) {
@@ -122,13 +120,6 @@ export default function EventsCarousel({
122120
{headline}
123121
</h2>
124122
<div className="flex w-full flex-col gap-xs sm:w-auto sm:flex-row">
125-
<Button
126-
label={scheduleCta}
127-
variant="primary"
128-
href="/schedule"
129-
arrow
130-
className="w-full sm:w-auto"
131-
/>
132123
<Button
133124
label={communityCta}
134125
variant="secondary"
@@ -159,36 +150,37 @@ export default function EventsCarousel({
159150
<li
160151
key={event.id}
161152
data-event-card
162-
className="block aspect-[3/2] w-[280px] shrink-0 snap-start md:w-[calc((100%-64px)/3)] md:min-w-[300px]"
153+
className="block w-[280px] shrink-0 snap-start md:w-[calc((100%-64px)/3)] md:min-w-[300px]"
163154
>
164155
<a
165156
href={event.url}
166-
className="group relative flex h-full w-full flex-col justify-end overflow-hidden border border-neutral-700 p-s focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white"
157+
className="group block h-full w-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-white"
167158
{...getAnchorLinkProps({ href: event.url })}
168159
>
169-
{event.coverUrl && (
170-
<>
160+
<span className="relative block aspect-[3/2] overflow-hidden border border-neutral-700 bg-neutral-800">
161+
{event.coverUrl && (
171162
<Image
172163
src={event.coverUrl}
173164
alt=""
174165
fill
175166
sizes="(min-width: 768px) 33vw, 280px"
176167
className="object-cover transition-transform duration-300 group-hover:scale-105"
177168
/>
178-
<span
179-
aria-hidden="true"
180-
className="absolute inset-0 bg-gradient-to-t from-black via-black/60 to-black/20"
181-
/>
182-
</>
183-
)}
184-
<span className="relative z-10 flex flex-col items-start">
185-
{time && (
186-
<span className="type-eyebrow text-white">{time}</span>
187169
)}
188-
<span className="type-eyebrow mt-3xs text-white">{date}</span>
189-
<span className="type-h5 mt-2xs text-white">
170+
</span>
171+
<span className="flex min-h-[128px] flex-col items-start border-x border-b border-neutral-700 p-s">
172+
<span className="type-h5-fixed text-white transition-opacity duration-200 group-hover:opacity-70">
190173
{event.title}
191174
</span>
175+
<span className="type-eyebrow mt-2xs flex flex-wrap gap-x-2xs gap-y-3xs text-text-secondary">
176+
<span>{date}</span>
177+
{time && (
178+
<>
179+
<span aria-hidden="true">/</span>
180+
<span>{time}</span>
181+
</>
182+
)}
183+
</span>
192184
<span className="sr-only">(opens in a new tab)</span>
193185
</span>
194186
</a>

apps/breakpoint/src/components/sections/EventsSection.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export default async function EventsSection() {
1616
<div className="container">
1717
<EventsCarousel
1818
headline={t("events.headline")}
19-
scheduleCta={t("events.scheduleCta")}
2019
communityCta={t("events.communityCta")}
2120
items={events}
2221
/>

apps/breakpoint/src/content/events/luma.ts

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { unstable_cache } from "next/cache";
22
import {
33
BREAKPOINT_LUMA_CALENDAR_ID,
44
BREAKPOINT_LUMA_EVENT_ID,
5-
HIGHLIGHTED_EVENT_URLS,
65
} from "@/content/links";
76
import type { HighlightedEvent } from "./types";
87

@@ -88,34 +87,11 @@ async function fetchCalendarEvents(): Promise<HighlightedEvent[]> {
8887
.filter((event): event is HighlightedEvent => event !== null);
8988
}
9089

91-
async function fetchPinnedEvent(
92-
slug: string,
93-
): Promise<HighlightedEvent | null> {
94-
const url = new URL(`${LUMA_API_BASE}/url`);
95-
url.searchParams.set("url", slug);
96-
97-
const payload = (await fetchLumaJson(url)) as {
98-
kind?: string;
99-
data?: LumaEventData & { event?: LumaEventData };
100-
} | null;
101-
102-
if (payload?.kind !== "event" || !payload.data) {
103-
return null;
104-
}
105-
106-
return normalizeLumaEvent(payload.data.event ?? payload.data);
107-
}
108-
10990
async function fetchHighlightedEvents(): Promise<HighlightedEvent[]> {
110-
const [calendarEvents, ...pinnedEvents] = await Promise.all([
111-
fetchCalendarEvents(),
112-
...HIGHLIGHTED_EVENT_URLS.map(fetchPinnedEvent),
113-
]);
114-
11591
const now = Date.now();
11692
const events = new Map<string, HighlightedEvent>();
11793

118-
for (const event of [...calendarEvents, ...pinnedEvents]) {
94+
for (const event of await fetchCalendarEvents()) {
11995
if (!event || event.id === BREAKPOINT_LUMA_EVENT_ID) continue;
12096
const endsAt = Date.parse(event.endAt ?? event.startAt);
12197
if (Number.isFinite(endsAt) && endsAt < now) continue;

apps/breakpoint/src/content/links.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ export const CONTENT_CREATOR_APPLICATION_HREF =
1212
"https://solanafoundation.typeform.com/bp26-creator";
1313
export const CODE_OF_CONDUCT_HREF = "https://shorturl.at/lEMR1";
1414
export const SIDE_EVENTS_HREF = "https://luma.com/BP-SideEvents";
15-
export const BREAKPOINT_LUMA_CALENDAR_ID = "evgrp-f8F1bDAHhBNDM1f";
16-
// Highlighted side events pinned by Luma URL slug until they land on the calendar.
17-
export const HIGHLIGHTED_EVENT_URLS = ["dmxdc394"];
15+
// Public calendar: https://luma.com/BP-Highlight
16+
export const BREAKPOINT_LUMA_CALENDAR_ID = "cal-J8paV20F2tKUEXI";
1817
export const BREAKPOINT_2025_ARCHIVES_URL =
1918
"https://www.youtube.com/playlist?list=PLilwLeBwGuK53OUOcc_GsCcbqcU5V4H9Z";
2019
export const BP25_RECAP_YOUTUBE_ID = "394wb968J68";

apps/breakpoint/src/content/page.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export type BreakpointMessages = {
7272
};
7373
events: {
7474
headline: string;
75-
scheduleCta: string;
7675
communityCta: string;
7776
};
7877
highlights: {

0 commit comments

Comments
 (0)