Files
nezha-dash-v1/src/hooks/use-sort.tsx
T
2025-12-28 18:05:02 +08:00

11 lines
280 B
TypeScript

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