Skip to content

Commit

Permalink
fix(web-ui): fixed infinite re-rendering loop caused by 'useInterval'
Browse files Browse the repository at this point in the history
  • Loading branch information
LooLzzz committed Sep 27, 2024
1 parent 1881f85 commit de58a1e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export default function Card({
const loadingOverlayVisible = isLoadingParents || isPolling || isRefetching || isLoading

const [seconds, setSeconds] = useState(0)
const interval = useInterval(() => setSeconds(s => s + 0.1), 100)
const advanceSeconds = useCallback(() => setSeconds(s => s + 0.1), [])
const interval = useInterval(advanceSeconds, 100)
const [executionDetailsModalVisible, {
open: executionDetailsModalOpen,
close: executionDetailsModalClose,
Expand Down

0 comments on commit de58a1e

Please sign in to comment.