Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 38 additions & 59 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ import type {
} from "@/lib/types"
import { CodeExample } from "@/lib/interfaces"

import ABTestWrapper from "@/components/AB/TestWrapper"
import ActivityStats from "@/components/ActivityStats"
import { ChevronNext } from "@/components/Chevron"
import HomeHero from "@/components/Hero/HomeHero"
import BentoCard from "@/components/Homepage/BentoCard"
import CodeExamples from "@/components/Homepage/CodeExamples"
import HomepageSectionImage from "@/components/Homepage/HomepageSectionImage"
import PersonaModalCTA from "@/components/Homepage/PersonaModalCTA"
import { getBentoBoxItems } from "@/components/Homepage/utils"
import ValuesMarqueeFallback from "@/components/Homepage/ValuesMarquee/Fallback"
import BlockHeap from "@/components/icons/block-heap.svg"
Expand Down Expand Up @@ -92,9 +90,6 @@ import {
} from "@/lib/data"
import EventFallback from "@/public/images/events/event-placeholder.png"

// Force dynamic rendering to enable A/B testing (requires headers())
export const dynamic = "force-dynamic"

const BentoCardSwiper = nextDynamic(
() => import("@/components/Homepage/BentoCardSwiper"),
{
Expand Down Expand Up @@ -455,60 +450,44 @@ const Page = async ({ params }: { params: PageParams }) => {
<MainArticle className="flex w-full flex-col items-center" dir={dir}>
<HomeHero />
<div className="w-full space-y-32 px-4 md:mx-6 lg:space-y-48">
<ABTestWrapper
testKey="HomepagePersonaCTAs"
variants={[
// Original: 4 CTAs grid
<div
key="four-ctas"
className="-mb-8 grid w-full grid-cols-2 gap-x-4 gap-y-8 border-b py-20 md:grid-cols-4 md:gap-x-10 lg:-mb-12"
>
{subHeroCTAs.map(
({ label, description, href, className, Svg }, idx) => {
const Link = (
props: Omit<
SvgButtonLinkProps,
"Svg" | "href" | "label" | "children"
>
) => (
<SvgButtonLink
Svg={Svg}
href={href}
label={label}
customEventOptions={{
eventCategory,
eventAction: "Top 4 CTAs",
eventName: subHeroCTAs[idx].eventName,
}}
{...props}
>
<p className="text-body">{description}</p>
</SvgButtonLink>
)
return (
<Fragment key={label}>
<Link
className={cn("xl:hidden", className)}
variant="col"
/>
<Link
className={cn("hidden xl:block", className)}
variant="row"
/>
</Fragment>
)
}
)}
</div>,
// Variation1: "Start here" button with persona modal
<div
key="persona-modal"
className="flex w-full items-center justify-center border-b pb-10"
>
<PersonaModalCTA eventCategory={eventCategory} />
</div>,
]}
/>
<div className="-mb-8 grid w-full grid-cols-2 gap-x-4 gap-y-8 border-b py-20 md:grid-cols-4 md:gap-x-10 lg:-mb-12">
{subHeroCTAs.map(
({ label, description, href, className, Svg }, idx) => {
const Link = (
props: Omit<
SvgButtonLinkProps,
"Svg" | "href" | "label" | "children"
>
) => (
<SvgButtonLink
Svg={Svg}
href={href}
label={label}
customEventOptions={{
eventCategory,
eventAction: "Top 4 CTAs",
eventName: subHeroCTAs[idx].eventName,
}}
{...props}
>
<p className="text-body">{description}</p>
</SvgButtonLink>
)
return (
<Fragment key={label}>
<Link
className={cn("xl:hidden", className)}
variant="col"
/>
<Link
className={cn("hidden xl:block", className)}
variant="row"
/>
</Fragment>
)
}
)}
</div>

{/* What is Ethereum */}
<Section
Expand Down
48 changes: 9 additions & 39 deletions src/components/Hero/HomeHero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { getLocale, getTranslations } from "next-intl/server"

import type { ClassNameProp } from "@/lib/types"

import ABTestWrapper from "@/components/AB/TestWrapper"
import LanguageMorpher from "@/components/Homepage/LanguageMorpher"

import { cn } from "@/lib/utils/cn"
Expand Down Expand Up @@ -69,44 +68,15 @@ const HomeHero = async ({
</picture>
</div>
<div className="flex flex-col items-center border-t-[3px] border-primary-low-contrast px-4 py-10 text-center">
<ABTestWrapper
testKey="HomepagePersonaCTAs"
variants={[
// Original: LanguageMorpher + existing title/description
<div
key="original-hero-content"
className="flex flex-col items-center"
>
<LanguageMorpher />
<div className="flex flex-col items-center gap-y-5 lg:max-w-2xl">
<h1 className="font-black">{t("page-index-title")}</h1>
<p className="max-w-96 text-md text-body-medium lg:text-lg">
{t("page-index-description")}
</p>
</div>
</div>,
// Variation1: New title/subtitle for persona modal
<div
key="persona-hero-content"
className="flex flex-col items-center gap-y-5 lg:max-w-2xl"
>
<LanguageMorpher />
<div className="flex flex-col items-center gap-y-5 lg:max-w-2xl">
<h1 className="font-black">
The internet
<br />
that belongs to you
</h1>
<p className="max-w-lg text-md text-body-medium lg:text-lg">
Create, own, build, connect, and transact.
<br />
Ethereum is a network that everyone can use and anyone can
build on.
</p>
</div>
</div>,
]}
/>
<div className="flex flex-col items-center">
<LanguageMorpher />
<div className="flex flex-col items-center gap-y-5 lg:max-w-2xl">
<h1 className="font-black">{t("page-index-title")}</h1>
<p className="max-w-96 text-md text-body-medium lg:text-lg">
{t("page-index-description")}
</p>
</div>
</div>
</div>
</div>
)
Expand Down
173 changes: 0 additions & 173 deletions src/components/Homepage/PersonaModalCTA.tsx

This file was deleted.