import React from 'react'; import {useShopStore} from "./shop_store"; /** * Component that provides a base layout (aside/main) for the page. */ export function Layout({aside, main}) { const {mobileSideMenuShouldOpen, onClickToggleMobileSideMenu, showCardAddedFeedback} = useShopStore((state) => ({ mobileSideMenuShouldOpen: state.sideMenuIsOpen, onClickToggleMobileSideMenu: state.switchSideMenu, showCardAddedFeedback: state.showCardAddedFeedback, isMobile: state.isMobile, })); return (
{mobileSideMenuShouldOpen ? (
{main}
) : (
{main}
)} {showCardAddedFeedback ? (
✓ added
) : null}
); }