File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,10 @@ type Props = {
2626 isShelleyActivated : boolean ,
2727} ;
2828
29- const getCategoryContent = ( categoryName : string , network ) => {
30- if ( categoryName === 'NETWORK_INFO' ) {
31- return < SidebarCategoryNetworkInfo network = { network } /> ;
32- }
33- return null ;
34- } ;
29+ const getCategoryContent = ( categoryName : string , network ) =>
30+ categoryName === 'NETWORK_INFO' ? (
31+ < SidebarCategoryNetworkInfo network = { network } />
32+ ) : null ;
3533
3634const Sidebar = ( {
3735 menus,
@@ -81,10 +79,8 @@ const Sidebar = ({
8179 < SidebarWalletsMenu
8280 wallets = { menus ?. wallets ?. items || [ ] }
8381 onAddWallet = { onAddWallet }
84- onWalletItemClick = { menus ?. wallets ?. actions ?. onWalletItemClick || null }
85- isActiveWallet = { ( id ) =>
86- id === ( menus ?. wallets ?. activeWalletId || null )
87- }
82+ onWalletItemClick = { menus ?. wallets ?. actions ?. onWalletItemClick }
83+ isActiveWallet = { ( id ) => id === menus ?. wallets ?. activeWalletId }
8884 isAddWalletButtonActive = { pathname === ROUTES . WALLETS . ADD }
8985 isShelleyActivated = { isShelleyActivated }
9086 visible = { isShowingSubMenus }
Original file line number Diff line number Diff line change 11// @flow
22import type { ShouldShowWalletSubMenu } from './types' ;
33
4- export const isCategoryActive = (
5- activeSidebarCategory : string ,
6- currentRoute : string
7- ) => activeSidebarCategory === currentRoute ;
8-
94export const shouldShowWalletSubMenu = ( {
105 activeSidebarCategory,
116 walletRoute,
127 menus,
138} : ShouldShowWalletSubMenu ) =>
14- menus ?. wallets ?. items && isCategoryActive ( activeSidebarCategory , walletRoute ) ;
9+ menus ?. wallets ?. items && activeSidebarCategory === walletRoute ;
You can’t perform that action at this time.
0 commit comments