refactor menu list items

This commit is contained in:
ammarahm-ed
2020-11-02 20:49:53 +05:00
parent f93c2ffc49
commit 1126c99661
3 changed files with 61 additions and 75 deletions

View File

@@ -29,8 +29,11 @@ export const MenuListItem = ({item, index, noTextMode, ignore, testID}) => {
});
eSendEvent(eClearSearch);
}
item.func();
if (item.func) {
item.func()
} else {
NavigationService.navigate(item.name)
}
if (item.close) {
NavigationService.closeDrawer();
}