diff --git a/web/pages/charity/index.tsx b/web/pages/charity/index.tsx index dd5653fc..0c970a42 100644 --- a/web/pages/charity/index.tsx +++ b/web/pages/charity/index.tsx @@ -38,7 +38,7 @@ export async function getStaticProps() { const matches = quadraticMatches(txns, totalRaised) const numDonors = uniqBy(txns, (txn) => txn.fromId).length const donorId = last(txns)?.fromId - const mostRecentDonor = donorId ? await getUser(donorId) : undefined + const mostRecentDonor = donorId ? await getUser(donorId) : null return { props: { @@ -91,7 +91,7 @@ export default function Charity(props: { matches: { [charityId: string]: number } txns: Txn[] numDonors: number - mostRecentDonor?: User + mostRecentDonor?: User | null }) { const { totalRaised, charities, matches, numDonors, mostRecentDonor } = props