Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/packages / features / Header / mobileMenuHamburger.js
Size: Mime:
/**
 * @todo @@perf @file sideEffects
 * @todo @fixme !!!!!!
 * putting dom inside of contents is not the same as what we do on minicart
 */
import * as React from 'react';
import { application } from '@skava/state';
//
import { MobileMenuSidebar } from '@skava/packages/features/Navigation/MobileMenu';
import { pancakeSidebar } from 'src/views/App/Sidebarz';
//
import { handleMenuToggle, handleShowMobileMenu } from './state';
/**
 * @todo this isn't a component, won't update...?
 * @todo this should factor in rehydration hit and happen on mount?
 */
const renderMobileMenuSidebar = () => {
    const isTabletOrSmaller = (application.isTablet || application.isPhone) &&
        !application.isDesktop &&
        typeof window === 'object';
    if (!isTabletOrSmaller) {
        console.warn('[pancake] skipping');
        return '';
    }
    console.debug('[pancake] rendering');
    // @todo key to insert in same dom as cart?
    return (React.createElement(MobileMenuSidebar, { key: "MobileMenu", state: pancakeSidebar, onLinkClicked: handleMenuToggle, onToggle: handleShowMobileMenu }));
};
export const setRender = () => {
    pancakeSidebar.setRender(renderMobileMenuSidebar);
};
export { renderMobileMenuSidebar };
//# sourceMappingURL=mobileMenuHamburger.js.map