diff --git a/fragments/users.js b/fragments/users.js index da2078618..b96ec9327 100644 --- a/fragments/users.js +++ b/fragments/users.js @@ -254,7 +254,7 @@ export const TOP_USERS = gql` photoId ncomments(when: $when, from: $from, to: $to) nposts(when: $when, from: $from, to: $to) - + proportion optional { stacked(when: $when, from: $from, to: $to) spent(when: $when, from: $from, to: $to) diff --git a/pages/rewards/index.js b/pages/rewards/index.js index 3176ada97..a81d88437 100644 --- a/pages/rewards/index.js +++ b/pages/rewards/index.js @@ -118,6 +118,7 @@ export default function Rewards ({ ssrData }) { if (!dat) return function EstimatedReward ({ rank, user }) { + if (!user) return null const referrerReward = Math.max(Math.floor(total * user.proportion * 0.2), 0) const reward = Math.max(Math.floor(total * user.proportion) - referrerReward, 0)