Move app to apps/web-react in pnpm workspace layout

This commit is contained in:
Kalle
2026-08-16 09:20:33 +03:00
parent 7e365ccfcf
commit bbc8ea57af
2913 changed files with 227 additions and 250 deletions

View File

@@ -0,0 +1,16 @@
import { AsyncLocalStorage } from "node:async_hooks";
interface ViewerTimezoneContext {
timezone: string | null;
}
export const viewerTimezoneAsyncLocalStorage =
new AsyncLocalStorage<ViewerTimezoneContext>();
/**
* The viewer's IANA timezone for the current request. `null` when the browser has
* not reported it yet, which is the case for a device's very first document request.
*/
export function getViewerTimezone(): string | null {
return viewerTimezoneAsyncLocalStorage.getStore()?.timezone ?? null;
}