docs: fix search in api reference (#6578)
* docs: fix search in api reference * remove log messages
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
export * from "./use-copy"
|
||||
export * from "./use-is-browser"
|
||||
export * from "./use-keyboard-shortcut"
|
||||
export * from "./use-scroll-utils"
|
||||
export * from "./use-search-navigation"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
export const useIsBrowser = () => {
|
||||
const [isBrowser, setIsBrowser] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setIsBrowser(typeof window !== "undefined")
|
||||
}, [])
|
||||
|
||||
return isBrowser
|
||||
}
|
||||
Reference in New Issue
Block a user