c44f223064
* Extract `useIsClient` hook * Fix a bunch of hydration bugs relevant to the contract page
8 lines
191 B
TypeScript
8 lines
191 B
TypeScript
import { useEffect, useState } from 'react'
|
|
|
|
export const useIsClient = () => {
|
|
const [isClient, setIsClient] = useState(false)
|
|
useEffect(() => setIsClient(true), [])
|
|
return isClient
|
|
}
|