Files
gridpilot.gg/apps/website/lib/utils.ts
2026-01-07 12:40:52 +01:00

15 lines
466 B
TypeScript

/**
* Utility function to check if code is running on server or client
* @returns true if running on server (SSR), false if running on client (browser)
*/
export function isServer(): boolean {
return typeof window === 'undefined';
}
/**
* Utility function to check if code is running on client
* @returns true if running on client (browser), false if running on server (SSR)
*/
export function isClient(): boolean {
return typeof window !== 'undefined';
}