mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-19 09:51:56 +08:00
11 lines
281 B
TypeScript
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
|
|
}
|