Skip to content

Commit db90f9e

Browse files
committed
add it on wallets/index page
1 parent 742c559 commit db90f9e

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/pages/wallets/index.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import { useRouter } from "next/router"
44
import { useTranslation } from "next-i18next"
55
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
66

7-
import { BasePageProps, Lang } from "@/lib/types"
7+
import { BasePageProps, CommitHistory, Lang } from "@/lib/types"
88

99
import Callout from "@/components/Callout"
1010
import Card from "@/components/Card"
1111
import CardList from "@/components/CardList"
1212
import FeedbackCard from "@/components/FeedbackCard"
13+
import FileContributors from "@/components/FileContributors"
1314
import HorizontalCard from "@/components/HorizontalCard"
1415
import { Image } from "@/components/Image"
1516
import MainArticle from "@/components/MainArticle"
@@ -22,6 +23,7 @@ import Translation from "@/components/Translation"
2223
import { ButtonLink } from "@/components/ui/buttons/Button"
2324
import { Divider } from "@/components/ui/divider"
2425

26+
import { getPageContributorInfo } from "@/lib/utils/contributors"
2527
import { existsNamespace } from "@/lib/utils/existsNamespace"
2628
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
2729
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -52,16 +54,27 @@ export const getStaticProps = (async ({ locale }) => {
5254

5355
const contentNotTranslated = !existsNamespace(locale!, requiredNamespaces[2])
5456

57+
const commitHistoryCache: CommitHistory = {}
58+
59+
const { contributors, lastEditLocaleTimestamp } =
60+
await getPageContributorInfo(
61+
"wallets/index.tsx",
62+
locale as Lang,
63+
commitHistoryCache
64+
)
65+
5566
return {
5667
props: {
5768
...(await serverSideTranslations(locale!, requiredNamespaces)),
5869
contentNotTranslated,
5970
lastDeployLocaleTimestamp,
71+
contributors,
72+
lastEditLocaleTimestamp,
6073
},
6174
}
6275
}) satisfies GetStaticProps<BasePageProps>
6376

64-
const WalletsPage = () => {
77+
const WalletsPage = ({ contributors, lastEditLocaleTimestamp }) => {
6578
const { locale } = useRouter()
6679
const { t } = useTranslation("page-wallets")
6780

@@ -406,6 +419,11 @@ const WalletsPage = () => {
406419
</div>
407420

408421
<div className="w-full px-8 py-4">
422+
<FileContributors
423+
className="my-10 border-t"
424+
contributors={contributors}
425+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
426+
/>
409427
<Divider />
410428

411429
<h2 className="mb-8 mt-12 text-2xl leading-[1.4] md:text-[2rem]">

0 commit comments

Comments
 (0)