feat: agenda polish, SLA sync, filters
This commit is contained in:
parent
7fb6c65d9a
commit
6ab8a6ce89
40 changed files with 2771 additions and 154 deletions
19
src/hooks/use-local-time-zone.ts
Normal file
19
src/hooks/use-local-time-zone.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { useEffect, useState } from "react"
|
||||
|
||||
export function useLocalTimeZone(fallback?: string) {
|
||||
const [timeZone, setTimeZone] = useState<string | undefined>(fallback)
|
||||
|
||||
useEffect(() => {
|
||||
if (typeof window === "undefined") return
|
||||
try {
|
||||
const resolved = Intl.DateTimeFormat().resolvedOptions().timeZone
|
||||
if (resolved) {
|
||||
setTimeZone(resolved)
|
||||
}
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}, [])
|
||||
|
||||
return timeZone
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue