mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-03-25 01:51:37 -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
6 lines
312 B
TypeScript
6 lines
312 B
TypeScript
import {useEffect, useLayoutEffect} from 'react'
|
|
|
|
// Note: This is kind of a hack and doesn't address the underlying problem.
|
|
// Inspired by https://github.com/react-component/overflow/issues/6#issuecomment-819215239
|
|
export const useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect
|