diff --git a/client/src/components/Inventory.tsx b/client/src/components/Inventory.tsx index ab2b0f3..ba86f66 100644 --- a/client/src/components/Inventory.tsx +++ b/client/src/components/Inventory.tsx @@ -54,7 +54,10 @@ function InventoryList({items, docType, openDoc} : {items: ComputedInventoryItem
{ setTab(cat) }}>{cat}
)} }
- { items.map(item => { + { [...items].sort( + // sort unavailable tactics/lemmas/def to the back. + (x, y) => +x.locked - +y.locked || +x.disabled - +y.disabled + ).map(item => { if (tab == item.category) { return {openDoc(item.name, docType)}} name={item.name} locked={item.locked} disabled={item.disabled} />