mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-02-05 21:20:08 +00:00
feat: sort provider
This commit is contained in:
10
src/hooks/use-sort.tsx
Normal file
10
src/hooks/use-sort.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user