From cd2a95f158a29e01e61728d27147bd344faae32a Mon Sep 17 00:00:00 2001 From: Sadaqat Ali Date: Fri, 10 Jun 2022 21:04:40 +0500 Subject: [PATCH] added separate schedules item in side menu --- src/components/sideMenu/view/sideMenuView.js | 11 +++++++++++ src/constants/sideMenuItems.js | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/src/components/sideMenu/view/sideMenuView.js b/src/components/sideMenu/view/sideMenuView.js index e2cbfb4d4..aee44718f 100644 --- a/src/components/sideMenu/view/sideMenuView.js +++ b/src/components/sideMenu/view/sideMenuView.js @@ -22,6 +22,7 @@ import { TextWithIcon } from '../../basicUIElements'; // Constants import MENU from '../../../constants/sideMenuItems'; +import ROUTES from '../../../constants/routeNames'; //Utils import { getVotingPower } from '../../../utils/manaBar'; @@ -89,6 +90,16 @@ const SideMenuView = ({ return; } + if (item.id === 'schedules') { + navigateToRoute({ + routeName: ROUTES.SCREENS.DRAFTS, + params: { + showSchedules: true, + }, + }); + return; + } + navigateToRoute(item.route); }; diff --git a/src/constants/sideMenuItems.js b/src/constants/sideMenuItems.js index ae457891b..cbf09b862 100644 --- a/src/constants/sideMenuItems.js +++ b/src/constants/sideMenuItems.js @@ -19,6 +19,12 @@ const authMenuItems = [ icon: 'docs', id: 'drafts', }, + { + name: 'Schedules', + route: ROUTES.SCREENS.DRAFTS, + icon: 'clock', + id: 'schedules', + }, { name: 'Communities', route: ROUTES.SCREENS.COMMUNITIES,