mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-05 17:39:28 +00:00
13 lines
398 B
TypeScript
13 lines
398 B
TypeScript
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;
|
|
}
|