import { useContext } from "react";

import { context } from "./ReportBuilderContext";

export function useReportBuilderContext() {
	const result = useContext(context);
	if (!result) {
		throw new Error("useReportBuilderContext requires to be logged in");
	}

	return result;
}
