Display module selection for alloys correctly

Closes #579
This commit is contained in:
Felix Linker
2021-05-09 18:42:25 +02:00
parent c07cfc6e70
commit d4e612cb61

View File

@@ -155,18 +155,18 @@ export default class AvailableModulesMenu extends TranslatedComponent {
}; };
} }
const mountSymbol = MOUNT_MAP[meta.mount]; const mountSymbol = MOUNT_MAP[meta.mount] || '';
const li = ( const li = (
<li key={Item} data-id={Item} <li key={Item} data-id={Item}
ref={Item === mountedModule.getItem() ? (ref) => { this.activeSlotRef = ref; } : undefined} ref={Item === mountedModule.getItem() ? (ref) => { this.activeSlotRef = ref; } : undefined}
className={cn('c', { className={cn(meta.type === 'armour' ? 'lc' : 'c', {
warning: !disabled && warning && warning(info), warning: !disabled && warning && warning(info),
active: mountedModule.getItem() === Item, active: mountedModule.getItem() === Item,
disabled, disabled,
hardpoint: mountSymbol, hardpoint: mountSymbol,
})} })}
{...eventHandlers} {...eventHandlers}
>{mountSymbol}{meta.class}{meta.rating}</li> >{meta.type === 'armour' ? Item : `${mountSymbol}${meta.class}${meta.rating}`}</li>
); );
const tail = elems.pop(); const tail = elems.pop();