Some checks failed
CI/CD Pipeline / unit-tests (push) Failing after 1m16s
CI/CD Pipeline / integration-tests (push) Failing after 2m32s
CI/CD Pipeline / lint (push) Successful in 5m22s
CI/CD Pipeline / e2e-tests (push) Has been skipped
CI/CD Pipeline / build (push) Has been skipped
13 lines
542 B
JavaScript
13 lines
542 B
JavaScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
|
|
/**
|
|
* A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
|
|
* This is useful for effects that are only needed for client-side rendering but not for SSR.
|
|
*
|
|
* Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
|
|
* and confirm it doesn't apply to your use-case.
|
|
*/
|
|
var useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
export default useEnhancedEffect; |