import { IonContent, IonIcon, IonItem, IonLabel, IonList, IonListHeader, IonMenu, IonMenuToggle, IonNote, } from '@ionic/react'; import { useLocation } from 'react-router-dom'; import { addOutline, addSharp, barChartOutline, barChartSharp, bookmarkOutline, listOutline, listSharp, } from 'ionicons/icons'; import './Menu.css'; import { SettingsStore } from '../store'; import { handleViewChange } from '../store/SettingsStore'; const appPages = [ { title: 'Add Item', url: '/page/add/0', iosIcon: addOutline, mdIcon: addSharp, }, ]; const actions = [ { title: 'Board View', slug: 'Board', url: false, onClick: () => handleViewChange('Board'), iosIcon: barChartOutline, mdIcon: barChartSharp, }, { title: 'List View', slug: 'List', url: false, onClick: () => handleViewChange('List'), iosIcon: listOutline, mdIcon: listSharp, }, ]; const Menu = (): React.JSX.Element => { const location = useLocation(); const view = SettingsStore.useState((s) => s.view); return ( Welcome back Ionic Kanban Board {appPages.map((appPage, index) => { return ( {appPage.title} ); })} Toggle View View items in list or board view {actions.map((action, index) => { return ( {action.title} ); })} ); }; export default Menu;