Skip to content

Commit 0319ac9

Browse files
committed
update types
1 parent f17e33e commit 0319ac9

File tree

13 files changed

+63
-27
lines changed

13 files changed

+63
-27
lines changed

app/[locale]/bug-bounty/_components/bug-bounty.tsx

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

33
import { HTMLAttributes } from "react"
44

5-
import type { ChildOnlyProp } from "@/lib/types"
5+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
66

77
/* Uncomment for Bug Bounty Banner: */
88
import BugBountyBanner from "@/components/Banners/BugBountyBanner"
@@ -225,7 +225,10 @@ const sortBountyHuntersFn = (a: BountyHuntersArg, b: BountyHuntersArg) => {
225225
return b.score - a.score
226226
}
227227

228-
const BugBountiesPage = ({ contributors, lastEditLocaleTimestamp }) => {
228+
const BugBountiesPage = ({
229+
contributors,
230+
lastEditLocaleTimestamp,
231+
}: PageWithContributorsProps) => {
229232
const pathname = usePathname()
230233
const { t } = useTranslation("page-bug-bounty")
231234

app/[locale]/dapps/_components/dapps.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import React, {
1111
import { useSearchParams } from "next/navigation"
1212
import { useLocale } from "next-intl"
1313

14-
import type { ChildOnlyProp } from "@/lib/types"
14+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
1515

1616
import BoxGrid from "@/components/BoxGrid"
1717
import Callout from "@/components/Callout"
@@ -285,7 +285,10 @@ interface Categories {
285285
[key: string]: Category
286286
}
287287

288-
const DappsPage = ({ contributors, lastEditLocaleTimestamp }) => {
288+
const DappsPage = ({
289+
contributors,
290+
lastEditLocaleTimestamp,
291+
}: PageWithContributorsProps) => {
289292
const { t } = useTranslation(["page-dapps", "common"])
290293
const searchParams = useSearchParams()
291294
const locale = useLocale()

app/[locale]/eth/_components/eth.tsx

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

33
import type { ComponentProps, HTMLAttributes } from "react"
44

5-
import type { ChildOnlyProp } from "@/lib/types"
5+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
66

77
import ActionCard from "@/components/ActionCard"
88
import CalloutBanner from "@/components/CalloutBanner"
@@ -169,7 +169,10 @@ const CentralActionCard = (props: ComponentProps<typeof ActionCard>) => (
169169
<ActionCard className="my-8" imageWidth={260} {...props} />
170170
)
171171

172-
const EthPage = ({ contributors, lastEditLocaleTimestamp }) => {
172+
const EthPage = ({
173+
contributors,
174+
lastEditLocaleTimestamp,
175+
}: PageWithContributorsProps) => {
173176
const { t } = useTranslation("page-eth")
174177
const pathname = usePathname()
175178

app/[locale]/gas/_components/gas.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import { BaseHTMLAttributes, ComponentPropsWithRef } from "react"
44

5+
import { PageWithContributorsProps } from "@/lib/types"
6+
57
import Callout from "@/components/Callout"
68
import Card from "@/components/Card"
79
import Emoji from "@/components/Emoji"
@@ -78,7 +80,10 @@ const H3 = ({
7880
<h3 className={cn("mb-8 mt-10 text-xl md:text-2xl", className)} {...props} />
7981
)
8082

81-
const GasPage = ({ contributors, lastEditLocaleTimestamp }) => {
83+
const GasPage = ({
84+
contributors,
85+
lastEditLocaleTimestamp,
86+
}: PageWithContributorsProps) => {
8287
const { t } = useTranslation("page-gas")
8388

8489
const benefits = [

app/[locale]/get-eth/_components/get-eth.tsx

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

33
import type { ReactNode } from "react"
44

5-
import type { ChildOnlyProp, FileContributor } from "@/lib/types"
5+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
66

77
import CalloutBanner from "@/components/CalloutBanner"
88
import CardList, {
@@ -65,10 +65,8 @@ const TwoColumnContent = (props: ChildOnlyProp) => (
6565
<div className="grid grid-cols-1 gap-16 lg:grid-cols-2" {...props} />
6666
)
6767

68-
type Props = {
68+
type Props = PageWithContributorsProps & {
6969
lastDataUpdateDate: string
70-
contributors: FileContributor[]
71-
lastEditLocaleTimestamp: string
7270
}
7371

7472
const GetEthPage = ({

app/[locale]/layer-2/learn/_components/learn.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"use client"
22

3+
import { PageWithContributorsProps } from "@/lib/types"
4+
35
import Callout from "@/components/Callout"
46
import Card from "@/components/Card"
57
import FileContributors from "@/components/FileContributors"
@@ -20,7 +22,10 @@ import Callout1Image from "@/public/images/man-and-dog-playing.png"
2022
import DAOImage from "@/public/images/use-cases/dao-2.png"
2123
import WhatIsEthereumImage from "@/public/images/what-is-ethereum.png"
2224

23-
const Layer2Learn = ({ contributors, lastEditLocaleTimestamp }) => {
25+
const Layer2Learn = ({
26+
contributors,
27+
lastEditLocaleTimestamp,
28+
}: PageWithContributorsProps) => {
2429
const { t } = useTranslation("page-layer-2-learn")
2530
const pathname = usePathname()
2631

app/[locale]/learn/_components/learn.tsx

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

33
import type { HTMLAttributes, ReactNode } from "react"
44

5-
import type { ChildOnlyProp, ToCItem } from "@/lib/types"
5+
import type {
6+
ChildOnlyProp,
7+
PageWithContributorsProps,
8+
ToCItem,
9+
} from "@/lib/types"
610

711
import OriginalCard, {
812
type CardProps as OriginalCardProps,
@@ -112,7 +116,10 @@ const ImageHeight200 = ({ src, alt }: ImageProps) => (
112116
<Image className="h-[200px] w-auto" src={src} alt={alt} />
113117
)
114118

115-
const LearnPage = ({ contributors, lastEditLocaleTimestamp }) => {
119+
const LearnPage = ({
120+
contributors,
121+
lastEditLocaleTimestamp,
122+
}: PageWithContributorsProps) => {
116123
const { t } = useTranslation("page-learn")
117124

118125
const tocItems = [

app/[locale]/roadmap/vision/_components/vision.tsx

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

33
import type { ComponentProps, ComponentPropsWithRef } from "react"
44

5-
import type { ChildOnlyProp } from "@/lib/types"
5+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
66

77
import Breadcrumbs from "@/components/Breadcrumbs"
88
import Card from "@/components/Card"
@@ -91,7 +91,10 @@ const TrilemmaContent = (props: ChildOnlyProp) => (
9191
/>
9292
)
9393

94-
const VisionPage = ({ contributors, lastEditLocaleTimestamp }) => {
94+
const VisionPage = ({
95+
contributors,
96+
lastEditLocaleTimestamp,
97+
}: PageWithContributorsProps) => {
9598
const { t } = useTranslation(["page-roadmap-vision", "page-upgrades-index"])
9699
const pathname = usePathname()
97100

app/[locale]/run-a-node/_components/run-a-node.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { HTMLAttributes } from "react"
44
import type { ReactNode } from "react"
55
import { FaDiscord } from "react-icons/fa"
66

7-
import type { ChildOnlyProp } from "@/lib/types"
7+
import type { ChildOnlyProp, PageWithContributorsProps } from "@/lib/types"
88

99
import Emoji from "@/components/Emoji"
1010
import ExpandableCard from "@/components/ExpandableCard"
@@ -205,7 +205,10 @@ type RunANodeCard = {
205205
alt: string
206206
}
207207

208-
const RunANodePage = ({ contributors, lastEditLocaleTimestamp }) => {
208+
const RunANodePage = ({
209+
contributors,
210+
lastEditLocaleTimestamp,
211+
}: PageWithContributorsProps) => {
209212
const { t } = useTranslation("page-run-a-node")
210213
const heroContent = {
211214
title: t("page-run-a-node-title"),

app/[locale]/staking/_components/staking.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { type HTMLAttributes, ReactNode } from "react"
44

55
import type {
66
ChildOnlyProp,
7-
FileContributor,
7+
PageWithContributorsProps,
88
StakingStatsData,
99
} from "@/lib/types"
1010

@@ -105,10 +105,8 @@ const StyledCard = (props: {
105105
</Card>
106106
)
107107

108-
type Props = {
108+
type Props = PageWithContributorsProps & {
109109
data: StakingStatsData
110-
contributors: FileContributor[]
111-
lastEditLocaleTimestamp: string
112110
}
113111

114112
const StakingPage = ({

0 commit comments

Comments
 (0)