Skip to content

Commit

Permalink
Merge branch 'main' into issue/554/scraper_does_not_fetch_bot_events
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaJ2305 authored Dec 24, 2024
2 parents 0c3b1ae + e1e21f1 commit 1948463
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 89 deletions.
2 changes: 1 addition & 1 deletion app/contributors/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default async function Page({ params }: Params) {
<div className="mt-10 flex flex-col justify-between rounded-lg border border-current bg-amber-300/20 px-4 py-4 font-semibold text-amber-500 dark:bg-amber-500/20 max-sm:mx-3 max-sm:gap-3 sm:flex-row sm:px-6 xl:px-10 ">
<span className="flex items-center gap-4">
<FiAlertTriangle size={20} />
Contributor profile has not been updated.
Bio is missing. Update it to complete the profile!
</span>
<Link
href={`https://github.com/${env.NEXT_PUBLIC_GITHUB_ORG}/leaderboard-data/edit/main/contributors/${contributor.github}.md`}
Expand Down
69 changes: 35 additions & 34 deletions app/discussions/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { fetchGithubDiscussion } from "../../lib/discussion";
import GithubDiscussions from "../../components/discussions/GithubDiscussions";
import { getContributors } from "@/lib/api";
import Link from "next/link";
import GithubDiscussions from "@/components/discussions/GithubDiscussions";
import { fetchGithubDiscussion } from "@/lib/discussion";

export default async function Page() {
const discussions = await fetchGithubDiscussion();
Expand All @@ -15,39 +15,40 @@ export default async function Page() {
return (
<>
<GithubDiscussions discussions={discussions} searchParams={{}} />
<div className="bg-secondary-100/50 dark:bg-secondary-800/50 h-fit w-full rounded-lg border border-secondary-100 shadow-lg dark:border-secondary-800 lg:fixed lg:right-28 lg:top-48 lg:w-[23%]">
<div className="flex flex-col justify-between rounded-t-lg border-b border-secondary-300 bg-secondary-100 px-6 py-4 dark:border-secondary-700 dark:bg-secondary-800 md:flex-row md:items-center">
<h4 className="font-bold">Most Helpful</h4>
</div>

<div className="flex flex-col gap-2 p-4 ">
{contributors
.filter((contributor) => contributor.points > 0)
.sort((a, b) => b.points - a.points)
.slice(0, 3)
.map((contributor, index) => (
<Link
key={index}
href={`/contributors/${contributor.githubHandle}`}
>
<span className="flex cursor-pointer items-center space-x-3 rounded-lg bg-background px-2 py-3 transition duration-300 hover:shadow-lg hover:shadow-primary-500">
<span className="flex h-10 w-10 items-center justify-center rounded-full bg-secondary-100 text-lg dark:bg-secondary-800">
{index + 1}
<div className="mb-4 h-fit w-full rounded-lg pt-7 lg:fixed lg:right-28 lg:top-20 lg:w-[23%]">
<div className="bg-secondary-100/50 dark:bg-secondary-800/50 w-full border border-secondary-100 shadow-lg dark:border-secondary-800">
<div className="flex flex-col justify-between rounded-t-lg border-b border-secondary-300 bg-secondary-100 px-6 py-4 dark:border-secondary-700 dark:bg-secondary-800 md:flex-row md:items-center">
<h4 className="font-bold">Most Helpful</h4>
</div>
<div className="flex flex-col gap-2 p-4 ">
{contributors
.filter((contributor) => contributor.points > 0)
.sort((a, b) => b.points - a.points)
.slice(0, 3)
.map((contributor, index) => (
<Link
key={index}
href={`/contributors/${contributor.githubHandle}`}
>
<span className="flex cursor-pointer items-center space-x-3 rounded-lg bg-background px-2 py-3 transition duration-300 hover:shadow-lg hover:shadow-primary-500">
<span className="flex h-10 w-10 items-center justify-center rounded-full bg-secondary-100 text-lg dark:bg-secondary-800">
{index + 1}
</span>
<span className="text-lg font-medium">
{contributor.name}
</span>
</span>
<span className="text-lg font-medium">
{contributor.name}
</span>
</span>
</Link>
))}
</div>
<div className="pt-2">
<Link
className="block rounded border border-primary-500 bg-gradient-to-b from-primary-500 to-primary-700 p-3 px-10 text-center font-bold text-white shadow-lg transition hover:from-secondary-800 hover:to-secondary-900 hover:text-primary-500 hover:shadow-xl"
href="/leaderboard?sortBy=discussion_comment_created"
>
Show More
</Link>
</Link>
))}
</div>
<div className="pt-2">
<Link
className="block rounded border border-primary-500 bg-gradient-to-b from-primary-500 to-primary-700 p-3 px-10 text-center font-bold text-white shadow-lg transition hover:from-secondary-800 hover:to-secondary-900 hover:text-primary-500 hover:shadow-xl"
href="/leaderboard/last-week?ordering=discussion_created"
>
Show More
</Link>
</div>
</div>
</div>
</>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"date-fns": "^2.30.0",
"gray-matter": "^4.0.3",
"jotai": "^2.10.2",
"next": "^14.2.10",
"next": "^14.2.15",
"next-themes": "^0.2.1",
"react": "^19.0.0",
"react-activity-calendar": "^2.2.11",
Expand Down
106 changes: 53 additions & 53 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1948463

Please sign in to comment.