mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-15 09:26:40 +00:00
add supporer key program
This commit is contained in:
12
src/hooks/useSupporterStatusContext.ts
Normal file
12
src/hooks/useSupporterStatusContext.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import SupporterStatusContext from "@app/contexts/supporterStatusContext";
|
||||
import { useContext } from "react";
|
||||
|
||||
export function useSupporterStatusContext() {
|
||||
const context = useContext(SupporterStatusContext);
|
||||
if (context === undefined) {
|
||||
throw new Error(
|
||||
"useSupporterStatusContext must be used within an SupporterStatusProvider"
|
||||
);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
Reference in New Issue
Block a user