From 48da721980d7a4a5eb2eb17e1cd044920f875e9d Mon Sep 17 00:00:00 2001 From: calli Date: Tue, 14 Apr 2026 22:08:26 +0300 Subject: [PATCH] fix launchpad storage calculations --- src/app/components/Account/AccountCard.tsx | 1 + src/app/components/PlanetaryInteraction/PlanetTableRow.tsx | 2 +- src/types/planet.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/Account/AccountCard.tsx b/src/app/components/Account/AccountCard.tsx index d0fd77c..2dec4d7 100644 --- a/src/app/components/Account/AccountCard.tsx +++ b/src/app/components/Account/AccountCard.tsx @@ -99,6 +99,7 @@ const calculatePlanetDetails = (planet: PlanetWithInfo, piPrices: EvePraisalResu const fillRate = storageCapacity > 0 ? (totalVolume / storageCapacity) * 100 : 0; return { + pin_id: storage.pin_id, type: storageType, type_id: storage.type_id, capacity: storageCapacity, diff --git a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx index b659a52..194175e 100644 --- a/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx +++ b/src/app/components/PlanetaryInteraction/PlanetTableRow.tsx @@ -438,7 +438,7 @@ export const PlanetTableRow = ({ .map((storage, idx) => { const fillRate = storage.fillRate; const color = fillRate > 90 ? '#ff0000' : fillRate > 80 ? '#ffa500' : fillRate > 60 ? '#ffd700' : 'inherit'; - const contents = planet.info.pins.find(p => p.type_id === storage.type_id)?.contents || []; + const contents = planet.info.pins.find(p => p.pin_id === storage.pin_id)?.contents || []; return ( diff --git a/src/types/planet.ts b/src/types/planet.ts index e91768a..e8289aa 100644 --- a/src/types/planet.ts +++ b/src/types/planet.ts @@ -6,6 +6,7 @@ export interface StorageContent { } export interface StorageInfo { + pin_id: number; type: string; type_id: number; capacity: number;