mirror of
https://github.com/fosrl/pangolin.git
synced 2026-01-28 22:00:51 +00:00
13 lines
386 B
TypeScript
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;
|
|
}
|