Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions website/app/contributors/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Image from "next/image";
import Link from "next/link";
import { getContributorStats } from "@/lib/contributors";
import { siteConfig } from "@/config/site";
import styles from "./page.module.css";

export default function ContributorsPage() {
Expand All @@ -13,6 +14,16 @@ export default function ContributorsPage() {
<p className={styles.description}>
Thank you to all the contributors who have documented patterns, anti-patterns, and obstacles.
</p>
<p className={styles.description}>
Want to contribute? Read the{" "}
<Link
href={`${siteConfig.links.github}/blob/main/CONTRIBUTE.md`}
target="_blank"
rel="noopener noreferrer"
>
contribution guide
</Link>.
</p>
</header>

<div className={styles.contributorGrid}>
Expand Down
9 changes: 9 additions & 0 deletions website/tests/unit/components/contributors-page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { render, screen } from '@testing-library/react'
import ContributorsPage from '@/app/contributors/page'
import { getContributorStats } from '@/lib/contributors'
import { ContributorStats } from '@/lib/contributors'
import { siteConfig } from '@/config/site'

jest.mock('@/lib/contributors')

Expand Down Expand Up @@ -77,6 +78,14 @@ describe('Contributors Page', () => {
expect(description).toBeInTheDocument()
})

it('should link to the contribution guide in a new tab', () => {
render(<ContributorsPage />)
const guideLink = screen.getByRole('link', { name: /contribution guide/i })
expect(guideLink).toHaveAttribute('href', `${siteConfig.links.github}/blob/main/CONTRIBUTE.md`)
expect(guideLink).toHaveAttribute('target', '_blank')
expect(guideLink).toHaveAttribute('rel', 'noopener noreferrer')
})

it('should render contributor cards with avatar, name, and counts', () => {
render(<ContributorsPage />)

Expand Down