-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/pip/scraper/requests-2.32.0
- Loading branch information
Showing
52 changed files
with
3,625 additions
and
779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { sitemapEntry } from "@/app/sitemap"; | ||
import { getContributors } from "@/lib/api"; | ||
import { MetadataRoute } from "next"; | ||
|
||
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { | ||
const contriutors = await getContributors(); | ||
return contriutors.map((contributor) => | ||
sitemapEntry(`/contributors/${contributor.github}`, { | ||
lastModified: contributor.activityData.last_updated | ||
? new Date(contributor.activityData.last_updated) | ||
: undefined, | ||
priority: 0.8, | ||
}), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Metadata } from "next"; | ||
import { env } from "@/env.mjs"; | ||
import { notFound } from "next/navigation"; | ||
import { featureIsEnabled } from "@/lib/utils"; | ||
import FilterDiscussions from "../../components/discussions/FilterDiscussions"; | ||
import { categories } from "../../lib/discussion"; | ||
import DiscussionLeaderboard from "../../components/discussions/DiscussionLeaderboard"; | ||
import { Suspense } from "react"; | ||
|
||
export const metadata: Metadata = { | ||
title: `Disucssions | ${env.NEXT_PUBLIC_PAGE_TITLE}`, | ||
}; | ||
|
||
export default function DiscussionsLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
if (!featureIsEnabled("Discussions")) return notFound(); | ||
|
||
return ( | ||
<div className="mx-auto max-w-6xl p-5"> | ||
<div className="items-center gap-5 pb-8 lg:mt-10 lg:flex"> | ||
<h1 className="text-3xl sm:text-4xl">Disucssions</h1> | ||
<Suspense fallback={<></>}> | ||
<FilterDiscussions categories={categories} /> | ||
</Suspense> | ||
</div> | ||
<div className="flex w-full flex-col-reverse gap-3 lg:flex lg:flex-row"> | ||
{children} | ||
<DiscussionLeaderboard /> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { fetchGithubDiscussion } from "../../lib/discussion"; | ||
import GithubDiscussions from "../../components/discussions/GithubDiscussions"; | ||
|
||
interface Params { | ||
searchParams: { [key: string]: string }; | ||
} | ||
|
||
export default async function Page({ searchParams }: Params) { | ||
const discussions = await fetchGithubDiscussion(); | ||
|
||
return ( | ||
discussions && ( | ||
<GithubDiscussions | ||
discussions={discussions} | ||
searchParams={searchParams} | ||
/> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.