@@ -3,7 +3,12 @@ import { useTranslation } from "next-i18next"
3
3
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
4
4
import type { ReactNode } from "react"
5
5
6
- import type { BasePageProps , ChildOnlyProp , Lang } from "@/lib/types"
6
+ import type {
7
+ BasePageProps ,
8
+ ChildOnlyProp ,
9
+ CommitHistory ,
10
+ Lang ,
11
+ } from "@/lib/types"
7
12
8
13
import CalloutBanner from "@/components/CalloutBanner"
9
14
import CardList , {
@@ -13,6 +18,7 @@ import CentralizedExchanges from "@/components/CentralizedExchanges"
13
18
import Emoji from "@/components/Emoji"
14
19
import EthPriceCard from "@/components/EthPriceCard"
15
20
import FeedbackCard from "@/components/FeedbackCard"
21
+ import FileContributors from "@/components/FileContributors"
16
22
import { Image } from "@/components/Image"
17
23
import MainArticle from "@/components/MainArticle"
18
24
import PageMetadata from "@/components/PageMetadata"
@@ -31,6 +37,7 @@ import { Stack } from "@/components/ui/flex"
31
37
import InlineLink from "@/components/ui/Link"
32
38
33
39
import { cn } from "@/lib/utils/cn"
40
+ import { getPageContributorInfo } from "@/lib/utils/contributors"
34
41
import { existsNamespace } from "@/lib/utils/existsNamespace"
35
42
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
36
43
import { getLastModifiedDateByPath } from "@/lib/utils/gh"
@@ -89,18 +96,31 @@ export const getStaticProps = (async ({ locale }) => {
89
96
lastDeployDate
90
97
)
91
98
99
+ const commitHistoryCache : CommitHistory = { }
100
+
101
+ const { contributors, lastEditLocaleTimestamp } =
102
+ await getPageContributorInfo (
103
+ "learn.tsx" ,
104
+ locale as Lang ,
105
+ commitHistoryCache
106
+ )
107
+
92
108
return {
93
109
props : {
94
110
...( await serverSideTranslations ( locale ! , requiredNamespaces ) ) ,
95
111
contentNotTranslated,
96
112
lastDeployLocaleTimestamp,
97
113
lastDataUpdateDate,
114
+ contributors,
115
+ lastEditLocaleTimestamp,
98
116
} ,
99
117
}
100
118
} ) satisfies GetStaticProps < Props >
101
119
102
120
const GetEthPage = ( {
103
121
lastDataUpdateDate,
122
+ contributors,
123
+ lastEditLocaleTimestamp,
104
124
} : InferGetStaticPropsType < typeof getStaticProps > ) => {
105
125
const { t } = useTranslation ( "page-get-eth" )
106
126
@@ -378,6 +398,11 @@ const GetEthPage = ({
378
398
</ Stack >
379
399
</ Stack >
380
400
</ TwoColumnContent >
401
+ < FileContributors
402
+ className = "my-10 border-t"
403
+ contributors = { contributors }
404
+ lastEditLocaleTimestamp = { lastEditLocaleTimestamp }
405
+ />
381
406
</ Stack >
382
407
383
408
< Divider className = "mx-auto my-16 md:my-32" />
0 commit comments