fix mini ranking showing error msg when loading
Some checks failed
Deploy Website / deploy (push) Failing after 1m42s

This commit is contained in:
Lee 2024-10-12 07:23:30 +01:00
parent 98e8273c07
commit c73f5c6373

View File

@ -114,11 +114,11 @@ export default function Mini({ type, player, shouldUpdate }: MiniProps) {
enabled: shouldUpdate,
});
if (isLoading) {
if (isLoading || !data) {
return <PlayerRankingSkeleton />;
}
if (isError || !data) {
if (isError) {
return <p className="text-red-500">Error loading ranking</p>;
}