diff --git a/src/components/frontend/eod/EodLeaderboard.tsx b/src/components/frontend/eod/EodLeaderboard.tsx
index 6073c58..586b3ff 100644
--- a/src/components/frontend/eod/EodLeaderboard.tsx
+++ b/src/components/frontend/eod/EodLeaderboard.tsx
@@ -44,6 +44,7 @@ interface ApiProfile {
interface LeaderboardRow {
id: number;
+ userId: number | null;
name: string;
gamesPlayed: number;
wins: number;
@@ -113,6 +114,7 @@ export function EodLeaderboard({
user?.displayName || doc.profileTitle || user?.username || `Operator #${doc.id}`;
return {
id: doc.id,
+ userId: user?.id ?? null,
name,
gamesPlayed: eod.gamesPlayed ?? 0,
wins: eod.wins ?? 0,
@@ -236,7 +238,7 @@ export function EodLeaderboard({
unranked
)}
- {activeTeams.some((team) => team.id === row.id) && (
+ {row.userId !== null && activeTeams.some((team) => team.id === row.userId) && (
)}
- {activePilots.some((pilot) => pilot.id === row.id) && (
+ {row.userId !== null && activePilots.some((pilot) => pilot.id === row.userId) && (
)}
diff --git a/src/components/frontend/radio/RadioLeaderboard.tsx b/src/components/frontend/radio/RadioLeaderboard.tsx
index 6ca4ea9..8e0f79b 100644
--- a/src/components/frontend/radio/RadioLeaderboard.tsx
+++ b/src/components/frontend/radio/RadioLeaderboard.tsx
@@ -41,6 +41,7 @@ interface ApiProfile {
interface LeaderboardRow {
id: number;
+ userId: number | null;
name: string;
totalMessages: number;
bestScore: number;
@@ -134,6 +135,7 @@ export function RadioLeaderboard({
const user = typeof doc.user === "object" && doc.user !== null ? doc.user : null;
return {
id: doc.id,
+ userId: user?.id ?? null,
name: user?.displayName || doc.profileTitle || user?.username || `Operator #${doc.id}`,
totalMessages:
radioTraffic[mode === "sprint" ? "sprintTotalMessages" : "watchTotalMessages"] ?? 0,
@@ -299,7 +301,7 @@ export function RadioLeaderboard({
unranked
)}
- {activeOperators.some((operator) => operator.id === row.id) && (
+ {row.userId !== null && activeOperators.some((operator) => operator.id === row.userId) && (