Skip to content

Commit 083cf2d

Browse files
committed
add it on gas page
1 parent 404c5c7 commit 083cf2d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

src/pages/gas.tsx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import { GetStaticProps } from "next/types"
33
import { useTranslation } from "next-i18next"
44
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
55

6-
import { BasePageProps, Lang } from "@/lib/types"
6+
import { BasePageProps, CommitHistory, Lang } from "@/lib/types"
77

88
import Callout from "@/components/Callout"
99
import Card from "@/components/Card"
1010
import Emoji from "@/components/Emoji"
1111
import ExpandableCard from "@/components/ExpandableCard"
1212
import FeedbackCard from "@/components/FeedbackCard"
13+
import FileContributors from "@/components/FileContributors"
1314
import GhostCard from "@/components/GhostCard"
1415
import HorizontalCard from "@/components/HorizontalCard"
1516
import { Image } from "@/components/Image"
@@ -35,6 +36,7 @@ import {
3536
import { Tag } from "@/components/ui/tag"
3637

3738
import { cn } from "@/lib/utils/cn"
39+
import { getPageContributorInfo } from "@/lib/utils/contributors"
3840
import { existsNamespace } from "@/lib/utils/existsNamespace"
3941
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
4042
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -95,16 +97,23 @@ export const getStaticProps = (async ({ locale }) => {
9597
lastDeployDate
9698
)
9799

100+
const commitHistoryCache: CommitHistory = {}
101+
102+
const { contributors, lastEditLocaleTimestamp } =
103+
await getPageContributorInfo("gas.tsx", locale as Lang, commitHistoryCache)
104+
98105
return {
99106
props: {
100107
...(await serverSideTranslations(locale!, requiredNamespaces)),
101108
contentNotTranslated,
102109
lastDeployLocaleTimestamp,
110+
contributors,
111+
lastEditLocaleTimestamp,
103112
},
104113
}
105114
}) satisfies GetStaticProps<BasePageProps>
106115

107-
const GasPage = () => {
116+
const GasPage = ({ contributors, lastEditLocaleTimestamp }) => {
108117
const { t } = useTranslation("page-gas")
109118

110119
const benefits = [
@@ -379,6 +388,11 @@ const GasPage = () => {
379388
<p className="mb-6">{t("page-gas-faq-question-3-a-2")}</p>
380389
</ExpandableCard>
381390
</div>
391+
<FileContributors
392+
className="my-10 border-t"
393+
contributors={contributors}
394+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
395+
/>
382396
</Content>
383397
<Divider />
384398
<Content>

src/pages/get-eth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const getStaticProps = (async ({ locale }) => {
100100

101101
const { contributors, lastEditLocaleTimestamp } =
102102
await getPageContributorInfo(
103-
"learn.tsx",
103+
"get-eth.tsx",
104104
locale as Lang,
105105
commitHistoryCache
106106
)

0 commit comments

Comments
 (0)