Skip to content

Commit

Permalink
Fix graphs displayed with zero data (#54)
Browse files Browse the repository at this point in the history
Refactor Profile Slug Content component to conditionally render the Graph component based on the length of dailyStats in the profile object
  • Loading branch information
chimpdev authored Aug 28, 2024
1 parent a2cc3a2 commit f80891a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/app/(profiles)/profile/[slug]/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default function Content({ profile }) {
</div>
</div>

<Graph profile={profile} />
{profile.dailyStats?.length > 0 && <Graph profile={profile} />}

{profile.servers.length > 0 && <Servers profile={profile} />}
</div>
Expand Down

0 comments on commit f80891a

Please sign in to comment.