bigbluebutton-tablet/react-native/app/contexts/portals/container.tsx

19 lines
471 B
TypeScript
Raw Permalink Normal View History

2022-02-25 03:08:12 +08:00
import React from 'react'
import { PortalContext } from './context'
type IPortalContext = {
portals?: any
setPortals?: any
}
export const PortalContextContainer = ({children}: any)=>{
const [portals, setPortals] = React.useState(0)
const portalHook: IPortalContext = {portals, setPortals}
return (
<>
<PortalContext.Provider value={portalHook}>
{children}
</PortalContext.Provider>
</>
)
}