Skip to content

Commit

Permalink
clear error message
Browse files Browse the repository at this point in the history
  • Loading branch information
vKxni committed Mar 18, 2024
1 parent 6add2c1 commit 0bb07ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/stats/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ const StatsUserPage: React.FC = () => {
} else if (userResponse.status === 404) {
setError('User not found');
} else {
setError('An error occurred. Please try again.');
setError('User not found.');
}

// Process Discord data response
if (discordResponse.ok) {
const discordData = await discordResponse.json();
setUserData((prevUserData: string[]) => ({ ...prevUserData, username: discordData.username }));
} else {
setError('An error occurred. Please try again.');
setError('User not found.');
}

setShowMenu(false);
Expand Down

0 comments on commit 0bb07ec

Please sign in to comment.