nezha-dash-v1/src/hooks/use-sort.tsx
2024-12-15 22:10:34 +08:00

11 lines
281 B
TypeScript

import { SortContext } from "@/context/sort-context"
import { useContext } from "react"
export function useSort() {
const context = useContext(SortContext)
if (context === undefined) {
throw new Error("useStatus must be used within a SortProvider")
}
return context
}