2023-06-28 01:12:17 +00:00
|
|
|
import React from 'react'
|
2023-07-01 09:46:36 +00:00
|
|
|
import { Box, Flex } from '@chakra-ui/react'
|
2023-06-28 01:12:17 +00:00
|
|
|
import { RainbowSkeleton } from '../Skeleton/RainbowSkeleton'
|
2023-06-29 23:41:06 +00:00
|
|
|
import { ProfileDrawer } from './ProfileDrawer'
|
2023-07-01 09:46:36 +00:00
|
|
|
import { Commander } from '../Commander/Commander'
|
2023-06-28 01:12:17 +00:00
|
|
|
|
|
|
|
export const Nav = props => {
|
2023-06-29 23:41:06 +00:00
|
|
|
const [profileDrawerOpen, setProfileDrawerOpen] = React.useState(false)
|
|
|
|
|
|
|
|
const toggleProfileDrawer = React.useCallback(() => {
|
|
|
|
setProfileDrawerOpen(!profileDrawerOpen)
|
|
|
|
}, [profileDrawerOpen])
|
|
|
|
|
2023-06-28 01:12:17 +00:00
|
|
|
return (
|
|
|
|
<>
|
2023-07-01 14:13:27 +00:00
|
|
|
<Box
|
|
|
|
position='fixed'
|
|
|
|
maxW='100vw'
|
|
|
|
top={0}
|
|
|
|
left={0}
|
|
|
|
right={0}
|
|
|
|
zIndex={999}
|
|
|
|
>
|
2023-07-01 09:46:36 +00:00
|
|
|
<Flex
|
|
|
|
as='nav'
|
|
|
|
w='100%'
|
2023-07-01 14:13:27 +00:00
|
|
|
maxW='100%'
|
2023-07-01 09:46:36 +00:00
|
|
|
alignItems={'center'}
|
|
|
|
position='relative'
|
|
|
|
justifyContent='center'
|
|
|
|
flexDir={'row'}
|
2023-07-04 08:05:08 +00:00
|
|
|
py={'10px'}
|
2023-07-01 09:46:36 +00:00
|
|
|
px={2}
|
2023-07-04 08:05:08 +00:00
|
|
|
// bg='white'
|
|
|
|
// boxShadow={'0px 0px 10px rgba(0,0,0,0.1)'}
|
2023-07-01 09:46:36 +00:00
|
|
|
>
|
|
|
|
<Commander></Commander>
|
|
|
|
<RainbowSkeleton
|
|
|
|
ml={'auto'}
|
|
|
|
w='25px'
|
|
|
|
h='25px'
|
2023-07-01 14:13:27 +00:00
|
|
|
cursor='pointer'
|
2023-07-01 09:46:36 +00:00
|
|
|
onClick={toggleProfileDrawer}
|
|
|
|
bg={'rgba(0,0,0,0.1)'}
|
|
|
|
sx={{}}
|
|
|
|
borderRadius='999px'
|
|
|
|
></RainbowSkeleton>
|
|
|
|
{/* <RainbowSkeleton w='40px' ml='auto' mr={"4px"}></RainbowSkeleton>
|
|
|
|
<RainbowSkeleton></RainbowSkeleton> */}
|
|
|
|
</Flex>
|
|
|
|
</Box>
|
2023-06-29 23:41:06 +00:00
|
|
|
{/* <ProfileDrawer isOpen={profileDrawerOpen}></ProfileDrawer> */}
|
2023-06-28 01:12:17 +00:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|