UNPKG

@softr/sdk

Version:

The SDK for building Softr apps on TanStack Start. It lets an app interact with Softr: auth, datasources, workflows and integrations.

13 lines (11 loc) • 421 B
import { useEffect } from "react"; //#region src/timezone.ts function useTimezoneCookie() { useEffect(() => { document.cookie = `user-timezone=${Intl.DateTimeFormat().resolvedOptions().timeZone}; path=/`; }, []); } /** @deprecated `SoftrProvider` runs it. Remove the call when the app renders `SoftrProvider`. */ const useUserTimezone = useTimezoneCookie; //#endregion export { useTimezoneCookie, useUserTimezone };