mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-04 12:40:10 +00:00
12 lines
293 B
TypeScript
12 lines
293 B
TypeScript
import { useContext } from "react"
|
|
|
|
import { StatusContext } from "../context/status-context"
|
|
|
|
export function useStatus() {
|
|
const context = useContext(StatusContext)
|
|
if (context === undefined) {
|
|
throw new Error("useStatus must be used within a StatusProvider")
|
|
}
|
|
return context
|
|
}
|