MCPcopy Create free account
hub / github.com/evolify/dumpfun / useDuration

Function useDuration

common/hooks/duration.ts:6–18  ·  view source on GitHub ↗
(defaultValue = "24h")

Source from the content-addressed store, hash-verified

4export const Durations: Duration[] = ["24h", "6h", "1h", "5m"]
5
6export function useDuration(defaultValue = "24h") {
7 const [duration, setDuration] = useState<Duration>(defaultValue as Duration)
8
9 function onChange(value: string) {
10 setDuration(value as Duration)
11 }
12
13 return {
14 duration,
15 setDuration,
16 onChange,
17 }
18}

Callers 2

TrendingFunction · 0.90
ListFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected