From 725d9e280243faeafed367fe04ef4d61391ae510 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 19 Jul 2026 17:23:47 +0300 Subject: [PATCH] Fix broken images --- app/features/cv/components/AbilityGrid.tsx | 23 +++++------------ app/features/cv/components/DeathCard.tsx | 15 +++++------ app/features/cv/components/MinimapCard.tsx | 25 ++++++++----------- app/features/cv/components/ScoreboardCard.tsx | 18 ++++++------- .../cv/components/ScoreboardOwnCard.tsx | 14 +++++------ app/features/cv/core/ability-harvest.ts | 3 ++- app/features/cv/cv-types.ts | 2 +- app/features/cv/routes/cv.tsx | 7 ++++++ 8 files changed, 50 insertions(+), 57 deletions(-) diff --git a/app/features/cv/components/AbilityGrid.tsx b/app/features/cv/components/AbilityGrid.tsx index 3f18047e1..b68f8e7b2 100644 --- a/app/features/cv/components/AbilityGrid.tsx +++ b/app/features/cv/components/AbilityGrid.tsx @@ -4,11 +4,12 @@ */ import { useState } from "react"; -import { CV_ASSETS_URL } from "~/utils/urls"; +import { Ability } from "~/components/Ability"; +import type { CvAbility } from "../cv-types"; const ROW_LABELS = ["head", "clothes", "shoes"] as const; -export function AbilityGrid({ abilities }: { abilities: string[][] }) { +export function AbilityGrid({ abilities }: { abilities: CvAbility[][] }) { return (
| {ROW_LABELS[i]} | {row.map((id, j) => (
-
+ |
))}
@@ -40,7 +32,7 @@ export function AbilityGrid({ abilities }: { abilities: string[][] }) {
* Click-to-toggle popover showing a player's ability grid; the trigger is
* the head-main ability icon. Closes when the pointer leaves it.
*/
-export function AbilityPopover({ abilities }: { abilities: string[][] }) {
+export function AbilityPopover({ abilities }: { abilities: CvAbility[][] }) {
const [open, setOpen] = useState(false);
const trigger = abilities[0]?.[0];
if (!trigger) return null;
@@ -53,10 +45,7 @@ export function AbilityPopover({ abilities }: { abilities: string[][] }) {
onClick={() => setOpen((o) => !o)}
title="Show abilities (from death events)"
>
- {player.name ?? ""} |
{player.weaponId !== null ? (
-
) : (
"?"
diff --git a/app/features/cv/components/ScoreboardCard.tsx b/app/features/cv/components/ScoreboardCard.tsx
index fe54712e3..da168523d 100644
--- a/app/features/cv/components/ScoreboardCard.tsx
+++ b/app/features/cv/components/ScoreboardCard.tsx
@@ -1,4 +1,4 @@
-import { CV_ASSETS_URL } from "~/utils/urls";
+import { WeaponImage } from "~/components/Image";
import type { PlayerAbilityMap } from "../core/ability-harvest";
import type {
ScoreboardData,
@@ -27,17 +27,17 @@ function PlayerRows({
|
- {p.weaponId !== null && (
-
- )}
- {abilities?.has(offset + i) && (
+ ) : null}
+ {abilities?.has(offset + i) ? (
|
{p.name || "?"} | diff --git a/app/features/cv/components/ScoreboardOwnCard.tsx b/app/features/cv/components/ScoreboardOwnCard.tsx index 2eb875422..e380e2866 100644 --- a/app/features/cv/components/ScoreboardOwnCard.tsx +++ b/app/features/cv/components/ScoreboardOwnCard.tsx @@ -1,4 +1,4 @@ -import { CV_ASSETS_URL } from "~/utils/urls"; +import { WeaponImage } from "~/components/Image"; import type { ScoreboardOwnData } from "../core/detectors/scoreboard-own/index"; import { AbilityGrid } from "./AbilityGrid"; import { saveFixtureFromEvent } from "./fixture-export"; @@ -59,14 +59,14 @@ export function ScoreboardOwnCard(props: {