diff --git a/src/lib/components/ui/PremierRatingBadge.svelte b/src/lib/components/ui/PremierRatingBadge.svelte
index fbb1b98..4336c84 100644
--- a/src/lib/components/ui/PremierRatingBadge.svelte
+++ b/src/lib/components/ui/PremierRatingBadge.svelte
@@ -23,14 +23,15 @@
class: className = ''
}: Props = $props();
- // Determine if this is a legacy CS:GO match (has old rank but no new rating)
- // CS:GO skill groups are 0-18, CS2 ratings are typically > 1000
+ // Determine if this is a legacy CS:GO match
+ // CS:GO skill groups are 0-18, CS2 ratings are typically 1000-30000
+ // For legacy matches, both rating and oldRating will be in the 0-18 range
const isLegacyRank = $derived(
- oldRating !== undefined &&
- oldRating !== null &&
- oldRating >= 0 &&
- oldRating <= 18 &&
- (!rating || rating === 0 || rating > 30000)
+ rating !== undefined &&
+ rating !== null &&
+ rating >= 0 &&
+ rating <= 18 &&
+ (oldRating === undefined || oldRating === null || (oldRating >= 0 && oldRating <= 18))
);
// Debug logging (temporary)
@@ -68,7 +69,8 @@
{#if isLegacyRank}
-
+
+
{:else if !rating || rating === 0}
Unranked