Skip to content

Commit d24cbbd

Browse files
committed
add it on eth page
1 parent a55a64a commit d24cbbd

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

src/intl/en/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"content-standardization": "Content standardization",
3131
"contributing": "Contributing",
3232
"contributors": "Contributors",
33-
"contributors-thanks": "Everyone who has <a href=\"https://ethereum.org/contributing\">contributed</a> to this page – thank you!",
33+
"contributors-thanks": "Everyone who has <a href=\"/contributing\">contributed</a> to this page – thank you!",
3434
"cookie-policy": "Cookie policy",
3535
"copied": "Copied",
3636
"copy": "Copy",

src/pages/eth.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import { useTranslation } from "next-i18next"
33
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
44
import type { ComponentProps, HTMLAttributes } from "react"
55

6-
import type { BasePageProps, ChildOnlyProp, Lang } from "@/lib/types"
6+
import type {
7+
BasePageProps,
8+
ChildOnlyProp,
9+
CommitHistory,
10+
Lang,
11+
} from "@/lib/types"
712

813
import ActionCard from "@/components/ActionCard"
914
import CalloutBanner from "@/components/CalloutBanner"
@@ -12,6 +17,7 @@ import CardList from "@/components/CardList"
1217
import EthPriceCard from "@/components/EthPriceCard"
1318
import EthVideo from "@/components/EthVideo"
1419
import FeedbackCard from "@/components/FeedbackCard"
20+
import FileContributors from "@/components/FileContributors"
1521
import HorizontalCard from "@/components/HorizontalCard"
1622
import { Image } from "@/components/Image"
1723
import InfoBanner from "@/components/InfoBanner"
@@ -26,6 +32,7 @@ import InlineLink from "@/components/ui/Link"
2632
import { ListItem, UnorderedList } from "@/components/ui/list"
2733

2834
import { cn } from "@/lib/utils/cn"
35+
import { getPageContributorInfo } from "@/lib/utils/contributors"
2936
import { existsNamespace } from "@/lib/utils/existsNamespace"
3037
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
3138
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -182,16 +189,23 @@ export const getStaticProps = (async ({ locale }) => {
182189
lastDeployDate
183190
)
184191

192+
const commitHistoryCache: CommitHistory = {}
193+
194+
const { contributors, lastEditLocaleTimestamp } =
195+
await getPageContributorInfo("eth.tsx", locale as Lang, commitHistoryCache)
196+
185197
return {
186198
props: {
187199
...(await serverSideTranslations(locale!, requiredNamespaces)),
188200
contentNotTranslated,
189201
lastDeployLocaleTimestamp,
202+
contributors,
203+
lastEditLocaleTimestamp,
190204
},
191205
}
192206
}) satisfies GetStaticProps<BasePageProps>
193207

194-
const EthPage = () => {
208+
const EthPage = ({ contributors, lastEditLocaleTimestamp }) => {
195209
const { t } = useTranslation("page-eth")
196210

197211
const tokens = [
@@ -472,6 +486,11 @@ const EthPage = () => {
472486
<StandaloneQuizWidget quizKey="what-is-ether" />
473487
</Content>
474488
<Content>
489+
<FileContributors
490+
className="my-10 border-t"
491+
contributors={contributors}
492+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
493+
/>
475494
<FeedbackCard />
476495
</Content>
477496
</Page>

0 commit comments

Comments
 (0)