fix launchpad storage calculations

This commit is contained in:
calli
2026-04-14 22:08:26 +03:00
parent bf31a7e2cb
commit 48da721980
3 changed files with 3 additions and 1 deletions
@@ -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,
@@ -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 (
<React.Fragment key={`storage-${character.character.characterId}-${planet.planet_id}-${storage.type}-${idx}`}>
+1
View File
@@ -6,6 +6,7 @@ export interface StorageContent {
}
export interface StorageInfo {
pin_id: number;
type: string;
type_id: number;
capacity: number;