Commit 8b1c556a authored by tom's avatar tom

fixes

parent 78e8800a
...@@ -67,7 +67,7 @@ const NavigationDesktop = () => { ...@@ -67,7 +67,7 @@ const NavigationDesktop = () => {
alignItems="center" alignItems="center"
flexDirection="row" flexDirection="row"
w="100%" w="100%"
px={ isCollapsed ? '15px' : 3 } px={{ lg: isExpanded ? 3 : '15px', xl: isCollapsed ? '15px' : 3 }}
h={ 10 } h={ 10 }
{ ...getDefaultTransitionProps({ transitionProperty: 'padding' }) } { ...getDefaultTransitionProps({ transitionProperty: 'padding' }) }
> >
......
import { Icon, Box, Image, useColorModeValue } from '@chakra-ui/react'; import { Icon, Box, Image, useColorModeValue, useBreakpointValue } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import appConfig from 'configs/app/config'; import appConfig from 'configs/app/config';
...@@ -18,9 +18,11 @@ const NetworkLogo = ({ isCollapsed, onClick }: Props) => { ...@@ -18,9 +18,11 @@ const NetworkLogo = ({ isCollapsed, onClick }: Props) => {
const href = link('network_index'); const href = link('network_index');
const style = useColorModeValue({}, { filter: 'brightness(0) invert(1)' }); const style = useColorModeValue({}, { filter: 'brightness(0) invert(1)' });
const isLg = useBreakpointValue({ base: false, lg: true, xl: false }, { ssr: true });
const logoEl = (() => { const logoEl = (() => {
if (isCollapsed) { const showSmallLogo = isCollapsed || (isCollapsed !== false && isLg);
if (showSmallLogo) {
if (appConfig.network.smallLogo) { if (appConfig.network.smallLogo) {
return ( return (
<Image <Image
...@@ -74,8 +76,8 @@ const NetworkLogo = ({ isCollapsed, onClick }: Props) => { ...@@ -74,8 +76,8 @@ const NetworkLogo = ({ isCollapsed, onClick }: Props) => {
<Box <Box
as="a" as="a"
href={ href } href={ href }
width={{ base: 'auto', lg: isCollapsed === false ? '113px' : '30px' }} width={{ base: 'auto', lg: isCollapsed === false ? '113px' : '30px', xl: isCollapsed ? '30px' : '113px' }}
height={ isCollapsed ? '30px' : '20px' } height={{ base: '20px', lg: isCollapsed === false ? '20px' : '30px', xl: isCollapsed ? '30px' : '20px' }}
display="inline-flex" display="inline-flex"
overflow="hidden" overflow="hidden"
onClick={ onClick } onClick={ onClick }
......
...@@ -16,7 +16,7 @@ const NetworkMenu = ({ isCollapsed }: Props) => { ...@@ -16,7 +16,7 @@ const NetworkMenu = ({ isCollapsed }: Props) => {
<Box <Box
marginLeft="auto" marginLeft="auto"
overflow="hidden" overflow="hidden"
width={ isCollapsed ? '0px' : 'auto' } width={{ base: 'auto', lg: isCollapsed === false ? 'auto' : '0px', xl: isCollapsed ? '0px' : 'auto' }}
> >
<NetworkMenuButton isActive={ isOpen }/> <NetworkMenuButton isActive={ isOpen }/>
</Box> </Box>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment