Skip to content

Commit 7b726b6

Browse files
committed
fix: bento box classes on homepage
avoids pre-loaded "Section" component, uses semantic "section" with as-needed classes instead to minimize hidden classes
1 parent 46537a5 commit 7b726b6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/pages/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,16 @@ const HomePage = ({
224224
</div>
225225

226226
{/* Use Cases - A new way to use the internet */}
227-
<Section
227+
<section
228228
className={cn(
229-
"max-lg:-mx-4 max-lg:w-[100vw] max-lg:overflow-hidden max-lg:px-4 sm:max-lg:-mx-6 sm:max-lg:px-6", // Mobile: Swiper cards
229+
"max-lg:-mx-4 max-lg:flex max-lg:w-[100vw] max-lg:flex-col max-lg:overflow-hidden max-lg:px-4 sm:max-lg:-mx-6 sm:max-lg:px-6", // Mobile: Swiper cards
230230
"lg:grid lg:grid-cols-bento lg:gap-4" // Desktop: BentoBox grid
231231
)}
232232
>
233233
<div
234234
className={cn(
235235
"flex flex-col",
236-
"lg:col-span-12 lg:flex xl:col-span-3 xl:col-start-2"
236+
"lg:col-span-12 xl:col-span-3 xl:col-start-2"
237237
)}
238238
>
239239
<div className="w-fit rounded-full bg-primary-low-contrast px-4 py-0 text-sm uppercase text-primary">
@@ -253,12 +253,12 @@ const HomePage = ({
253253
"[&_.swiper]:mx-auto [&_.swiper]:mt-4 [&_.swiper]:!flex [&_.swiper]:h-fit [&_.swiper]:max-w-128 [&_.swiper]:flex-col [&_.swiper]:items-center"
254254
)}
255255
>
256-
{bentoItems.map((item) => (
256+
{bentoItems.map(({ className, ...item }) => (
257257
<BentoCard
258258
key={item.title}
259259
imgHeight={220}
260260
{...item}
261-
className={cn(item.className, "bg-background text-body")}
261+
className={cn(className, "bg-background text-body")}
262262
imgWidth={undefined} // Intentionally last to override box
263263
/>
264264
))}
@@ -272,7 +272,7 @@ const HomePage = ({
272272
className={cn(className, "max-lg:hidden")} // Desktop only
273273
/>
274274
))}
275-
</Section>
275+
</section>
276276

277277
{/* Activity - The strongest ecosystem */}
278278
<Section>

0 commit comments

Comments
 (0)