import React , { useContext } from 'react' ; import { TransformBoxContext , setShowTransformBox } from '@/contexts/transformBox' ; import LayoutNav from './nav' ; type Props = { children ? : any ; } ; interface LayoutMobile { ( props ) : JSX . Element | null ; } const LayoutMobile = ( { children } ) => { const transformBoxCtx = useContext ( TransformBoxContext ) ; return ( < > < LayoutNav showSidebar = { transformBoxCtx . show } onSidebar = { ( ) => transformBoxCtx . dispatch ( setShowTransformBox ( true ) ) } /> < />); } ; export default LayoutMobile ;