Skip to content

Commit dc57d24

Browse files
authored
Merge branch 'dev' into content-hero
2 parents d60693d + 1c60308 commit dc57d24

File tree

751 files changed

+24391
-17550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

751 files changed

+24391
-17550
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
# Google API key and Calendar ID (required to fetch Calendar events)
2323
# GOOGLE_API_KEY=
2424
# GOOGLE_CALENDAR_ID=
25+
# GOOGLE_SHEET_ID_DAPPS=
2526

2627
# Dune Analytics API key (required for total eth staked)
2728
# DUNE_API_KEY=

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const config: StorybookConfig = {
4949

5050
config.resolve.alias = {
5151
...config.resolve.alias,
52-
"@/storybook/*": path.resolve(__dirname, "./.storybook/"),
52+
"@/storybook/*": path.resolve(process.cwd(), ".storybook"),
5353
}
5454
}
5555

app/[locale]/10years/_components/UserStories/index.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22

33
import { useState } from "react"
44

5+
import { Story } from "@/lib/types"
6+
57
import Twitter from "@/components/icons/twitter.svg"
68
import { Button, ButtonLink } from "@/components/ui/buttons/Button"
79

810
import { cn } from "@/lib/utils/cn"
911

1012
import { useTranslation } from "@/hooks/useTranslation"
1113

12-
type Story = {
13-
name: string
14-
storyEnglish: string
15-
storyOriginal: string | null
16-
twitter?: string
17-
country: string
18-
date: string
19-
}
20-
2114
type StoriesProps = {
2215
stories: Story[]
2316
}

app/[locale]/10years/page.tsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
isAddressFiltered,
5050
type TorchHolder,
5151
} from "@/lib/torch"
52-
import TenYearLogo from "@/public/images/10-year-anniversary/10-year-logo.png"
5352
import Curved10YearsText from "@/public/images/10-year-anniversary/10y-torch-heading.svg"
5453

5554
// In seconds
@@ -421,21 +420,6 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
421420
<Stories stories={stories} />
422421
</I18nProvider>
423422
</div>
424-
425-
<div className="w-full gap-8 px-8 py-8 pt-32">
426-
<div className="flex flex-col items-center gap-4 rounded-2xl bg-ten-year-gradient p-8">
427-
<Image
428-
src={TenYearLogo}
429-
alt="10 year anniversary logo"
430-
className="mb-8 max-h-80 object-contain sm:mb-12"
431-
/>
432-
<h3>{t("page-10-year-ideas-title")}</h3>
433-
<p>{t("page-10-year-ideas-description")}</p>
434-
<ButtonLink href="mailto:[email protected]">
435-
{t("page-10-year-ideas-cta")}
436-
</ButtonLink>
437-
</div>
438-
</div>
439423
</MainArticle>
440424
)
441425
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
"use client"
2+
3+
import { useState } from "react"
4+
5+
import { Image } from "@/components/Image"
6+
import Modal from "@/components/ui/dialog-modal"
7+
import {
8+
Swiper,
9+
SwiperContainer,
10+
SwiperNavigation,
11+
SwiperSlide,
12+
} from "@/components/ui/swiper"
13+
14+
import { trackCustomEvent } from "@/lib/utils/matomo"
15+
16+
import { useBreakpointValue } from "@/hooks/useBreakpointValue"
17+
18+
interface ScreenshotSwiperProps {
19+
screenshots: string[]
20+
appName: string
21+
}
22+
23+
const ScreenshotSwiper = ({ screenshots, appName }: ScreenshotSwiperProps) => {
24+
const lazyPreloadPrevNext = useBreakpointValue({ base: 1, sm: 2, md: 4 })
25+
const [isModalOpen, setIsModalOpen] = useState(false)
26+
const [currentImageIndex, setCurrentImageIndex] = useState<number | null>(
27+
null
28+
)
29+
30+
const handleImageClick = (index: number) => {
31+
setCurrentImageIndex(index)
32+
setIsModalOpen(true)
33+
}
34+
35+
return (
36+
<SwiperContainer>
37+
<Swiper
38+
slidesPerView="auto"
39+
spaceBetween={16}
40+
lazyPreloadPrevNext={lazyPreloadPrevNext}
41+
>
42+
{screenshots.map((screenshot, index) => (
43+
<SwiperSlide key={index} className="!w-auto">
44+
<Image
45+
src={screenshot}
46+
alt={`Screenshot ${index + 1} of ${appName} showing the application interface`}
47+
width={300}
48+
height={600}
49+
sizes="(max-width: 640px) 150px, (max-width: 1024px) 200px, 250px"
50+
className="h-[200px] w-auto cursor-pointer rounded-lg object-contain transition-transform hover:scale-105 md:h-[350px]"
51+
onClick={() => {
52+
handleImageClick(index)
53+
trackCustomEvent({
54+
eventCategory: "detail",
55+
eventAction: "gallery_open",
56+
eventName: `app name ${appName}`,
57+
})
58+
}}
59+
/>
60+
</SwiperSlide>
61+
))}
62+
<SwiperNavigation />
63+
</Swiper>
64+
65+
<Modal
66+
open={isModalOpen}
67+
onOpenChange={(open) => {
68+
setIsModalOpen(open)
69+
if (!open) {
70+
setCurrentImageIndex(null)
71+
}
72+
}}
73+
size="xl"
74+
title={`${appName} Screenshots`}
75+
contentProps={{
76+
className: "max-w-[95vw] max-h-[95vh] p-2 md:p-8",
77+
}}
78+
>
79+
<div className="relative">
80+
<SwiperContainer>
81+
<Swiper
82+
slidesPerView={1}
83+
spaceBetween={0}
84+
initialSlide={currentImageIndex ?? 0}
85+
>
86+
{screenshots.map((screenshot, index) => (
87+
<SwiperSlide key={index} className="!w-full">
88+
<div className="flex items-center justify-center">
89+
<Image
90+
src={screenshot}
91+
alt={`Screenshot ${index + 1} of ${appName}`}
92+
width={800}
93+
height={1200}
94+
sizes="(max-width: 768px) 90vw, (max-width: 1024px) 80vw, 70vw"
95+
className="max-h-[60vh] w-auto rounded-lg object-contain md:max-h-[70vh]"
96+
/>
97+
</div>
98+
</SwiperSlide>
99+
))}
100+
<SwiperNavigation />
101+
</Swiper>
102+
</SwiperContainer>
103+
</div>
104+
</Modal>
105+
</SwiperContainer>
106+
)
107+
}
108+
109+
export default ScreenshotSwiper

0 commit comments

Comments
 (0)