File tree Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Expand file tree Collapse file tree 4 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,16 @@ import {
11
11
12
12
import { cn } from "@/lib/utils/cn"
13
13
14
- import { adoptionCards , adoptionStyles } from "./data "
14
+ import { AdoptionCard } from "./types "
15
15
16
- const AdoptionSwiper = ( ) => {
16
+ type AdoptionCardProps = {
17
+ adoptionCards : AdoptionCard [ ]
18
+ adoptionStyles : string [ ]
19
+ }
20
+ const AdoptionSwiper = ( {
21
+ adoptionCards,
22
+ adoptionStyles,
23
+ } : AdoptionCardProps ) => {
17
24
return (
18
25
< div className = "flex flex-1 flex-col gap-6 md:hidden" >
19
26
< SwiperContainer className = "mx-auto w-full max-w-[550px]" >
Original file line number Diff line number Diff line change 1
1
import Link from "@/components/ui/Link"
2
2
3
+ import { AdoptionCard } from "./types"
4
+
3
5
import Adoption1Image from "@/public/images/10-year-anniversary/adoption-1.png"
4
6
import Adoption2Image from "@/public/images/10-year-anniversary/adoption-2.png"
5
7
import Adoption3Image from "@/public/images/10-year-anniversary/adoption-3.png"
@@ -13,7 +15,7 @@ import StableCoinImage from "@/public/images/10-year-anniversary/the-pioneer-sta
13
15
import Adoption4Image from "@/public/images/10-year-anniversary/walking-talking-1.png"
14
16
import Adoption6Image from "@/public/images/10-year-anniversary/walking-talking-2.png"
15
17
16
- const adoptionCards = [
18
+ const adoptionCards : AdoptionCard [ ] = [
17
19
{
18
20
image : Adoption1Image ,
19
21
title : "Decade of Decentralization" ,
Original file line number Diff line number Diff line change
1
+ import { StaticImageData } from "next/image"
2
+
1
3
export type Story = {
2
4
storyEnglish : string
3
5
storyOriginal : string
@@ -8,3 +10,11 @@ export type Story = {
8
10
twitter : string
9
11
region : string
10
12
}
13
+
14
+ export type AdoptionCard = {
15
+ image : StaticImageData
16
+ title : string
17
+ description : React . ReactNode
18
+ href : string
19
+ linkText : string
20
+ }
Original file line number Diff line number Diff line change @@ -274,7 +274,10 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
274
274
</ p >
275
275
</ div >
276
276
</ div >
277
- < AdoptionSwiper />
277
+ < AdoptionSwiper
278
+ adoptionCards = { adoptionCards }
279
+ adoptionStyles = { adoptionStyles }
280
+ />
278
281
< div className = "hidden flex-1 flex-col gap-6 md:flex" >
279
282
{ adoptionCards . map ( ( card , index ) => (
280
283
< div
You can’t perform that action at this time.
0 commit comments