Files
pangolin/src/hooks/useLicenseStatusContext.ts
2025-05-13 11:09:38 -04:00

13 lines
386 B
TypeScript

import LicenseStatusContext from "@app/contexts/licenseStatusContext";
import { useContext } from "react";
export function useLicenseStatusContext() {
const context = useContext(LicenseStatusContext);
if (context === undefined) {
throw new Error(
"useLicenseStatusContext must be used within an LicenseStatusProvider"
);
}
return context;
}