Skip to content

Commit

Permalink
FIX: add math.random to setInterval
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains authored and Overtorment committed Jun 30, 2020
1 parent ce23009 commit 7804ff7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BlueComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ export const BlueTransactionListItem = React.memo(({ item, itemPriceUnit = Bitco
// re-render component every one minute
const [tick, setTick] = useState(0);
useEffect(() => {
const id = setInterval(() => setTick(tick + 1), 60000);
const id = setInterval(() => setTick(tick + 1), 60000 + Math.random() * 5000);
return () => clearInterval(id);
}, [tick]);

Expand Down

0 comments on commit 7804ff7

Please sign in to comment.