File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,15 @@ export const MobileNavigation: React.FC<MobileNavigationProps> = ({ isOpen, onCl
8787 . filter ( ( s ) => ! s . hide )
8888 . map ( ( menu ) => (
8989 < MenuItem isMainPath = { isMainPath } key = { menu . id } >
90- < MenuLink isMainPath = { isMainPath } to = { menu . route_code } onClick = { handleClose } >
91- { menu . name }
92- </ MenuLink >
90+ { ! R . isEmpty ( menu . children ) && Object . values ( menu . children ) . some ( ( child ) => ! child . hide ) ? (
91+ < MenuButton isMainPath = { isMainPath } onClick = { ( ) => navigateToDepth2 ( menu ) } >
92+ { menu . name }
93+ </ MenuButton >
94+ ) : (
95+ < MenuLink isMainPath = { isMainPath } to = { menu . route_code } onClick = { handleClose } >
96+ { menu . name }
97+ </ MenuLink >
98+ ) }
9399 { ! R . isEmpty ( menu . children ) && Object . values ( menu . children ) . some ( ( child ) => ! child . hide ) && (
94100 < MenuArrowButton isMainPath = { isMainPath } onClick = { ( ) => navigateToDepth2 ( menu ) } >
95101 < ArrowForward fontSize = "small" />
@@ -250,6 +256,17 @@ const MenuLink = styled(Link)<{ isMainPath?: boolean }>(({ theme, isMainPath = t
250256 fontWeight : 600 ,
251257} ) ) ;
252258
259+ const MenuButton = styled ( Button ) < { isMainPath ?: boolean } > ( ( { theme, isMainPath = true } ) => ( {
260+ color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
261+ textTransform : "none" ,
262+ fontSize : "20px" ,
263+ fontWeight : 600 ,
264+ padding : 0 ,
265+ minWidth : "auto" ,
266+ minHeight : "auto" ,
267+ justifyContent : "flex-start" ,
268+ } ) ) ;
269+
253270const MenuArrowButton = styled ( IconButton ) < { isMainPath ?: boolean } > ( ( { theme, isMainPath = true } ) => ( {
254271 color : isMainPath ? theme . palette . mobileNavigation . main . text : theme . palette . mobileNavigation . sub . text ,
255272 padding : 8 ,
You can’t perform that action at this time.
0 commit comments