Files
frontend-app-authoring/src/course-unit/context/hooks.tsx
Peter Kulko 411607ec59 feat: [FC-0070] Manage Tags interoperation (#1454)
Added interaction between MFE and Legacy tagging functionality for xblocks on the Course unit page.
2025-03-03 11:07:04 -03:00

12 lines
318 B
TypeScript

import { useContext } from 'react';
import { IframeContext, IframeContextType } from './iFrameContext';
export const useIframe = (): IframeContextType => {
const context = useContext(IframeContext);
if (!context) {
throw new Error('useIframe must be used within an IframeProvider');
}
return context;
};