mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 10:02:27 -04:00
* Test * Add pretty formatting * Fix Tests * Fix Tests * Fix Tests * Fix * Add pretty formatting fix * Fix * Test * Fix tests * Clean typeckech * Add prettier check * Fix api tsconfig * Fix api tsconfig * Fix tsconfig * Fix * Fix * Prettier
9 lines
305 B
TypeScript
9 lines
305 B
TypeScript
import {useEffect} from 'react'
|
|
import {usePersistentInMemoryState} from 'web/hooks/use-persistent-in-memory-state'
|
|
|
|
export const useIsClient = () => {
|
|
const [isClient, setIsClient] = usePersistentInMemoryState(false, 'is-client')
|
|
useEffect(() => setIsClient(true), [setIsClient])
|
|
return isClient
|
|
}
|