Merge pull request #5654 from urbit/po/fix-loop-in-tile-grid

grid: fix loop caused by useEffect in tilegrid
This commit is contained in:
Hunter Miller 2022-03-21 15:21:23 -05:00 committed by GitHub
commit f83403942e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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]);