mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 12:40:10 +00:00
13 lines
327 B
TypeScript
13 lines
327 B
TypeScript
import { TooltipContext } from "@/context/tooltip-context"
|
|
import { useContext } from "react"
|
|
|
|
export const useTooltip = () => {
|
|
const context = useContext(TooltipContext)
|
|
if (context === undefined) {
|
|
throw new Error("useTooltip must be used within a TooltipProvider")
|
|
}
|
|
return context
|
|
}
|
|
|
|
export default useTooltip
|