grid: fix loop caused by useEffect in tilegrid

This commit is contained in:
Patrick O'Sullivan 2022-03-21 15:15:39 -05:00
parent 3d2472f8b4
commit 3c68499b86

View File

@ -46,11 +46,7 @@ export const TileGrid = ({ menu }: TileGridProps) => {
} else if (order.length > chargeKeys.length && chargeKeys.length !== 0) {
useSettingsState
.getState()
.putEntry(
'tiles',
'order',
uniq(order.filter((key) => !(key in charges)).concat(chargeKeys))
);
.putEntry('tiles', 'order', uniq(order.filter((key) => key in charges).concat(chargeKeys)));
}
}, [charges, order]);