diff --git a/src/CalculationDetail/CalculationDetail.tsx b/src/CalculationDetail/CalculationDetail.tsx index 54582ff..0ca4f9c 100644 --- a/src/CalculationDetail/CalculationDetail.tsx +++ b/src/CalculationDetail/CalculationDetail.tsx @@ -89,7 +89,7 @@ const CalculationDetailMeta = (props: { attributeId: number; attribute: ShipSnap const eveData = React.useContext(EveDataContext); const eveAttribute = eveData.dogmaAttributes?.[props.attributeId]; - const sortedEffects = props.attribute.effects.sort((a, b) => { + const sortedEffects = Object.values(props.attribute.effects).sort((a, b) => { const aIndex = Object.keys(EffectOperatorOrder).indexOf(a.operator); const bIndex = Object.keys(EffectOperatorOrder).indexOf(b.operator); if (aIndex === -1 || bIndex === -1) { diff --git a/src/HardwareListing/HardwareListing.tsx b/src/HardwareListing/HardwareListing.tsx index 0c2b9c4..8333334 100644 --- a/src/HardwareListing/HardwareListing.tsx +++ b/src/HardwareListing/HardwareListing.tsx @@ -46,7 +46,7 @@ const ModuleGroup = (props: { level: number; group: ListingGroup; hideGroup?: bo const getChildren = React.useCallback(() => { return ( <> - {props.group.items + {Object.values(props.group.items) .sort((a, b) => a.meta - b.meta || a.name.localeCompare(b.name)) .map((item) => { if (item.slotType === "charge") { @@ -386,7 +386,7 @@ export const HardwareListing = () => {
- {modulesWithCharges + {Object.values(modulesWithCharges) .sort((a, b) => a.name.localeCompare(b.name)) .map((chargeGroup) => { return ( diff --git a/src/HullListing/HullListing.tsx b/src/HullListing/HullListing.tsx index 30a05eb..8248d5b 100644 --- a/src/HullListing/HullListing.tsx +++ b/src/HullListing/HullListing.tsx @@ -50,7 +50,7 @@ const Hull = (props: { typeId: number; entry: ListingHull }) => { let index = 0; return ( <> - {props.entry.fits + {Object.values(props.entry.fits) .sort((a, b) => a.fit.name.localeCompare(b.fit.name)) .map((fit) => { index += 1;