diff --git a/src/pages/reputation-score/[...score].tsx b/src/pages/reputation-score/[...score].tsx index 89a64d35..965c2cb7 100644 --- a/src/pages/reputation-score/[...score].tsx +++ b/src/pages/reputation-score/[...score].tsx @@ -16,6 +16,7 @@ const ScorePage = () => { const { retrieveReputationScore } = useAppStore(); const router = useRouter(); + const [communityName, setCommunityName] = useState(null); const [reputationScore, setReputationScore] = useState(null); const [loading, setLoading] = useState(true); const [tokenId, setTokenId] = useState(null); @@ -48,7 +49,8 @@ const ScorePage = () => { }); console.log('Reputation Score Retrieved:', score); - setReputationScore(score ?? 0); + setReputationScore(score.reputationScore ?? 0); + setCommunityName(score.communityName); } catch (error) { console.error('Error fetching reputation score:', error); showMessage('Failed to load reputation score.', 'error'); @@ -162,7 +164,8 @@ const ScorePage = () => {

- Your score is dynamically calculated from platform activity. + Your score is dynamically calculated from platform activity on{' '} + {communityName}

} diff --git a/src/pages/statistics.tsx b/src/pages/statistics.tsx index 6b9e7816..9a76b069 100644 --- a/src/pages/statistics.tsx +++ b/src/pages/statistics.tsx @@ -29,8 +29,7 @@ const Statistics = () => { const router = useRouter(); const platform = community?.platforms.find( - (platform) => - platform.disconnectedAt === null && platform.name === 'discord' + (platform) => platform.id === selectedPlatform ); const isPremiumGuild: boolean = Boolean(