bigbluebutton-tablet/react-native/app/contexts/portals/hook.ts
2022-02-24 16:08:12 -03:00

11 lines
302 B
TypeScript

import React, { useContext } from 'react'
import { PortalContext } from './context';
type IPortalContext = {
portals?: any
setPortals?: any
}
export const usePortal = (): IPortalContext=>{
const contextOfPortals = useContext(PortalContext);
return contextOfPortals as IPortalContext;
}