mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Feature ## What is the current behavior? The /events page only loads events from the Notion "Developer Events" database and the Luma Community API. MDX files under `apps/www/_events/` (including webinars like agency-webinar, sentry, datadog, figma-make) are not surfaced on the listing, and past events could still appear until the moment they ended because the filter compared against `now()` rather than the current day. Addresses [DEBR-85](https://linear.app/supabase/issue/DEBR-85/events-page-powered-by-notion-page). ## What is the new behavior? - New `getMdxEvents()` reads `apps/www/_events/*.mdx`, parses frontmatter with `gray-matter`, and returns today-and-future events as `SupabaseEvent`s. - `/events` now merges Notion + mdx + Luma events. - Past events are hidden across all sources by comparing against the start of today (UTC) instead of `now()`, so events running today stay visible throughout the day. ## Additional context Links on mdx events point at the main_cta URL when it's an external \`http(s)\` URL, otherwise fall back to the built \`/events/{slug}\` page so on-demand recordings remain reachable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Events can be sourced from MDX files and merged into site event listings. * Luma supports multiple calendars (community and hackathon) for richer feeds. * **Improvements** * Events now exclude anything before the start of the current UTC day. * Added a “Community Event” category filter and included it in counts. * Event title typography adjusted for improved readability. * “Hosted by” text now only shows when hosts exist; host fallbacks standardized. * **Chores** * Build env updated to include hackathon API key. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
'use client'
|
|
|
|
import { EventsProvider, useEvents } from '~/app/events/context'
|
|
import { EventBanner } from '~/components/Events/new/EventBanner'
|
|
import DefaultLayout from '~/components/Layouts/Default'
|
|
import { SupabaseEvent } from '~/lib/eventsTypes'
|
|
|
|
import { EventGallery } from './EventGallery'
|
|
import { EventsContainer } from './EventsContainer'
|
|
|
|
function EventBannerSection() {
|
|
const { isLoading, featuredEvent } = useEvents()
|
|
if (!isLoading && !featuredEvent) return null
|
|
|
|
return (
|
|
<EventsContainer className="border-x border-b flex-1 py-8 bg-surface-200">
|
|
<EventBanner />
|
|
</EventsContainer>
|
|
)
|
|
}
|
|
|
|
export function EventClientRenderer({
|
|
notionEvents,
|
|
mdxEvents,
|
|
}: {
|
|
notionEvents: SupabaseEvent[]
|
|
mdxEvents: SupabaseEvent[]
|
|
}) {
|
|
return (
|
|
<EventsProvider notionEvents={notionEvents} mdxEvents={mdxEvents}>
|
|
<DefaultLayout className="flex flex-col">
|
|
<EventsContainer className="border-x border-b py-8">
|
|
<h1 className="h3 p-0! m-0!">
|
|
<span className="sr-only">Supabase</span> Events
|
|
</h1>
|
|
<p className="text-foreground-light">Join us at the following upcoming events</p>
|
|
</EventsContainer>
|
|
|
|
<EventBannerSection />
|
|
|
|
<EventsContainer className="border-x flex-1 py-8">
|
|
<EventGallery />
|
|
</EventsContainer>
|
|
</DefaultLayout>
|
|
</EventsProvider>
|
|
)
|
|
}
|