From c73f5c6373cba0c2b7defd256417313b1383a0f4 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 12 Oct 2024 07:23:30 +0100 Subject: [PATCH] fix mini ranking showing error msg when loading --- projects/website/src/components/ranking/mini.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/website/src/components/ranking/mini.tsx b/projects/website/src/components/ranking/mini.tsx index 978bd9f..62c8f6b 100644 --- a/projects/website/src/components/ranking/mini.tsx +++ b/projects/website/src/components/ranking/mini.tsx @@ -114,11 +114,11 @@ export default function Mini({ type, player, shouldUpdate }: MiniProps) { enabled: shouldUpdate, }); - if (isLoading) { + if (isLoading || !data) { return ; } - if (isError || !data) { + if (isError) { return

Error loading ranking

; }