Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| return Number.isFinite(parsed) && parsed > 0 ? parsed : undefined; | ||
| } | ||
|
|
||
| export function formatUsd(amount: number): string { |
There was a problem hiding this comment.
Can you update our existing formatUsdValue instead? Let's have it take in another param for fractionDigits and set both minimumFractionDigits and maximumFractionDigits inside it to this value
components/Funding/FundingChart.tsx
Outdated
| Tooltip, | ||
| Legend, | ||
| } from 'chart.js'; | ||
| import { formatMonth } from '@/app/funding/dashboard/lib/dashboardUtils'; |
There was a problem hiding this comment.
formatMonth is too generic and makes me think like it is a utility function that we should put elsewhere. Let's rename formatMonthForChart since that's where we seem to use it
|
|
||
| const query = userId ? `?user_id=${userId}` : ''; | ||
|
|
||
| ApiClient.get<RawImpactData>(`/api/fundraise/funding_impact/${query}`) |
There was a problem hiding this comment.
Let's create a function endpoint in fundraise.service.ts for this
types/impactData.ts
Outdated
| matchedContributions: number; | ||
| } | ||
|
|
||
| export interface ImpactData { |
There was a problem hiding this comment.
ImpactData is too generic. Let's call it FundingImpactData
Same with milestones - FundingMilestone
also update the file name.
Having a prefix makes it a lot easier when searching through files or code to understand what belongs
|



Overview
This PR just creates two Impact related charts in seperated components to be utilized in the new UX
Screenshot