20 lines
390 B
TypeScript
Raw Normal View History

import { useContext } from "react"
2024-03-23 22:19:49 +00:00
import { ThingtimeContext } from "../../Providers/ThingtimeProvider"
const getGlobal = () => {
try {
return window
} catch {
return globalThis
}
}
2024-03-23 22:19:49 +00:00
export const useThingtime = (props?: any): any => {
const value = useContext(ThingtimeContext)
// const { thingtime, setThingtime, getThingtime, thingtimeRef } = value
return value
}