Skip to content

Commit d65157e

Browse files
committed
Move "use client" and dynamically import GalleryStrip (to move motin to another bundle)
1 parent 2f969c6 commit d65157e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/app/(main)/community/events/events-list.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client"
2+
13
import { useState, type ComponentPropsWithoutRef } from "react"
24
import { clsx } from "clsx"
35

src/app/(main)/community/events/page.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"use client"
2-
31
import { Breadcrumbs } from "@/_design-system/breadcrumbs"
42
import { meetups } from "@/components/meetups"
53

@@ -9,6 +7,15 @@ import { events, type Event, type Meetup } from "./events"
97
import { BenefitsSection } from "./benefits-section"
108
import { GetYourMeetupNoticedSection } from "./get-your-meetup-noticed-section"
119
import { BringGraphQLToYourCommunity } from "./bring-graphql-to-your-community"
10+
import dynamic from "next/dynamic"
11+
12+
const GalleryStrip = dynamic(
13+
() =>
14+
import("@/app/conf/2025/components/gallery-strip").then(
15+
mod => mod.GalleryStrip,
16+
),
17+
{ ssr: false },
18+
)
1219

1320
const { pastEvents, upcomingEvents } = events.reduce(
1421
(acc, event) => {
@@ -96,6 +103,12 @@ export default function EventsPage() {
96103
<EventsList events={pastEventsAndMeetups} />
97104
</section>
98105

106+
<h2 className="typography-h2 text-center">Event gallery</h2>
107+
<p className="typography-body-md mt-6 text-center">
108+
A look back at what’s been happening.
109+
</p>
110+
<GalleryStrip className="[&>:first-child]:mx-auto" />
111+
99112
<BenefitsSection />
100113
<GetYourMeetupNoticedSection />
101114
</div>

0 commit comments

Comments
 (0)