@ducor/react
Version:
admin template ui interface
11 lines (10 loc) • 320 B
JavaScript
import { useContext } from "react";
import { LoadingContext } from "../provider/loading";
var useLoading = function () {
var context = useContext(LoadingContext);
if (!context) {
throw new Error("useLoading must be used within a LoadingProvider");
}
return context;
};
export default useLoading;