Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying users's rank in leaderboard is null if user hasn't popped balloons #344

Open
SimonStnn opened this issue Oct 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@SimonStnn
Copy link
Owner

const Caption = () => {
if (isLoading) {
return <TextSkeleton className="w-16" />;
}
if (data.rank === null && data.user.username === undefined) {
return (
<p className="text-balance">
Set your username in{' '}
<Button variant={'link'} className="h-fit p-0 font-normal" asChild>
<Link to="/settings">settings</Link>
</Button>{' '}
to view your position on the leaderboard.
</p>
);
}
return <p>You are #{data.rank}!</p>;
};

In this caption component there should be another check that checks if the user's count is 0 or if the rank is null. It it is it should return "Start popping to view your position on the leaderboard.".

@SimonStnn SimonStnn added the bug Something isn't working label Oct 20, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Pop-a-loon Oct 20, 2024
@SimonStnn SimonStnn moved this from Backlog to Ready in Pop-a-loon Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Ready
Development

No branches or pull requests

1 participant