refactor: tidy

This commit is contained in:
cha0s 2024-06-24 05:02:13 -05:00
parent 3b08a87f39
commit cc8c78cb30

View File

@ -154,13 +154,7 @@ export default function Ui({disconnected}) {
if (update.Inventory) {
const newHotbarSlots = emptySlots();
for (let i = 1; i < 11; ++i) {
if (entity.Inventory.slots[i]) {
const {qty, source} = entity.Inventory.slots[i];
newHotbarSlots[i - 1] = {
image: source + '/icon.png',
qty,
};
}
newHotbarSlots[i - 1] = entity.Inventory.slots[i];
}
setHotbarSlots(newHotbarSlots);
}