Skip to content

Commit 742c559

Browse files
committed
add it on bug-bounty page
1 parent 083cf2d commit 742c559

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/pages/bug-bounty.tsx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ import type { GetStaticProps } from "next/types"
44
import { useTranslation } from "next-i18next"
55
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
66

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

914
/* Uncomment for Bug Bounty Banner: */
1015
import BugBountyBanner from "@/components/Banners/BugBountyBanner"
@@ -15,6 +20,7 @@ import CardList from "@/components/CardList"
1520
import Emoji from "@/components/Emoji"
1621
import ExpandableCard from "@/components/ExpandableCard"
1722
import FeedbackCard from "@/components/FeedbackCard"
23+
import FileContributors from "@/components/FileContributors"
1824
import { Image, type ImageProps } from "@/components/Image"
1925
import Leaderboard from "@/components/Leaderboard"
2026
import MainArticle from "@/components/MainArticle"
@@ -27,6 +33,7 @@ import InlineLink from "@/components/ui/Link"
2733
import { ListItem, UnorderedList } from "@/components/ui/list"
2834

2935
import { cn } from "@/lib/utils/cn"
36+
import { getPageContributorInfo } from "@/lib/utils/contributors"
3037
import { existsNamespace } from "@/lib/utils/existsNamespace"
3138
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
3239
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -240,16 +247,27 @@ export const getStaticProps = (async ({ locale }) => {
240247
lastDeployDate
241248
)
242249

250+
const commitHistoryCache: CommitHistory = {}
251+
252+
const { contributors, lastEditLocaleTimestamp } =
253+
await getPageContributorInfo(
254+
"bug-bounty.tsx",
255+
locale as Lang,
256+
commitHistoryCache
257+
)
258+
243259
return {
244260
props: {
245261
...(await serverSideTranslations(locale!, requiredNamespaces)),
246262
contentNotTranslated,
247263
lastDeployLocaleTimestamp,
264+
contributors,
265+
lastEditLocaleTimestamp,
248266
},
249267
}
250268
}) satisfies GetStaticProps<BasePageProps>
251269

252-
const BugBountiesPage = () => {
270+
const BugBountiesPage = ({ contributors, lastEditLocaleTimestamp }) => {
253271
const { pathname } = useRouter()
254272
const { t } = useTranslation("page-bug-bounty")
255273

@@ -797,6 +815,11 @@ const BugBountiesPage = () => {
797815
</ExpandableCard>
798816
</RightColumn>
799817
</Faq>
818+
<FileContributors
819+
className="my-10 border-t"
820+
contributors={contributors}
821+
lastEditLocaleTimestamp={lastEditLocaleTimestamp}
822+
/>
800823
</Content>
801824
<Divider />
802825
<Contact>

0 commit comments

Comments
 (0)