[APP-1776] Refactor Live Now config, reorg files (#9871)

This commit is contained in:
Eric Bailey
2026-02-16 11:44:22 -06:00
committed by GitHub
parent 8ee9709fbb
commit cc2255cc49
34 changed files with 414 additions and 285 deletions
+16
View File
@@ -0,0 +1,16 @@
import {useEffect, useState} from 'react'
/**
* Returns a debounced version of the input value that only updates after the
* specified delay has passed without any changes to the input value.
*/
export function useDebouncedValue<T>(val: T, delayMs: number): T {
const [prev, setPrev] = useState(val)
useEffect(() => {
const timeout = setTimeout(() => setPrev(val), delayMs)
return () => clearTimeout(timeout)
}, [val, delayMs])
return prev
}