diff --git a/app/bot-commands/devpool-docs.tsx b/app/bot-commands/devpool-docs.tsx index b61d00f..6f8202f 100644 --- a/app/bot-commands/devpool-docs.tsx +++ b/app/bot-commands/devpool-docs.tsx @@ -177,10 +177,10 @@ const DevPoolDocs = () => {
{[ - { cmd: '/bug', desc: 'Mark bug-report issues' }, - { cmd: '/impact', desc: 'Flag high-impact PRs' }, - { cmd: '/doc', desc: 'Mark documentation PRs' }, - { cmd: '/test', desc: 'Mark testing PRs' }, + { cmd: '/bug @username', desc: 'Mark bug-report issues' }, + { cmd: '/impact @username', desc: 'Flag high-impact PRs' }, + { cmd: '/doc @username', desc: 'Mark documentation PRs' }, + { cmd: '/test @username', desc: 'Mark testing PRs' }, ].map((b, i) => (
{ const fetchLeaderboard = async () => { try { setLeaderboardLoading(true); - const result = await make_api_call<{ - message: string; - profiles: { - full_name: string | null; - github_username: string; - bounty: number; - solutions: number; - }[]; - }>({ - url: `${process.env.NEXT_PUBLIC_BACKEND_URL}/registrations`, + const result = await make_api_call({ + url: `${process.env.NEXT_PUBLIC_BACKEND_URL}/leaderboard`, method: 'GET', headers: { Authorization: `Bearer ${user?.accessToken}`, }, }); - const formattedData: TUserData[] = (result.data?.profiles ?? []).map( - (profile) => ({ + const profiles = result.data?.leaderboard || []; + + const formattedData: TUserData[] = profiles + .filter( + (profile) => + profile.github_username && profile.github_username !== '', + ) + .map((profile) => ({ fullName: profile.full_name || '', username: profile.github_username, - bounty: profile.bounty, + bounty: Number(profile.bounty || 0), accountActive: true, - _count: { Solution: profile.solutions.toString() }, - }), - ); + _count: { + Solution: ( + profile.pull_requests_merged || + profile.solutions || + 0 + ).toString(), + }, + })); formattedData.sort((a, b) => b.bounty - a.bounty); @@ -332,13 +348,8 @@ const Leaderboard = ({ user }: { user: AuthUser | null }) => {
- {data.fullName || data.username} + @{data.username}
- {data.username && ( -
- @{data.username} -
- )}
{currentView === 'leaderboard' && ( diff --git a/app/components/repo-components/IssueCard.tsx b/app/components/repo-components/IssueCard.tsx index a569814..b088da4 100644 --- a/app/components/repo-components/IssueCard.tsx +++ b/app/components/repo-components/IssueCard.tsx @@ -24,8 +24,8 @@ const IssueCard = (props: IssuesData) => { title, url, language, - // bounty, - // difficulty, + bounty, + difficulty, isClaimed, claimedByList, // multiplierActive, @@ -74,7 +74,7 @@ const IssueCard = (props: IssuesData) => {
- {/* { aria-label={`Difficulty: ${difficulty}`} > {difficulty} - */} + + + + {bounty} + {/* {multiplierActive && multiplierValue && ( {
{/*
-