2023-07-07 07:42:14 +00:00
|
|
|
import React from "react"
|
2023-08-09 00:43:18 +00:00
|
|
|
import { Box, Center, Flex } from "@chakra-ui/react"
|
|
|
|
import { Link } from "@remix-run/react"
|
2023-06-28 01:12:17 +00:00
|
|
|
|
2023-07-07 07:42:14 +00:00
|
|
|
import { Commander } from "../Commander/Commander"
|
2023-08-09 00:43:18 +00:00
|
|
|
import { Icon } from "../Icon/Icon"
|
2023-07-07 07:42:14 +00:00
|
|
|
import { RainbowSkeleton } from "../Skeleton/RainbowSkeleton"
|
|
|
|
import { ProfileDrawer } from "./ProfileDrawer"
|
|
|
|
|
|
|
|
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
|
2023-07-07 07:42:14 +00:00
|
|
|
position="fixed"
|
|
|
|
zIndex={999}
|
2023-07-01 14:13:27 +00:00
|
|
|
top={0}
|
|
|
|
right={0}
|
2023-07-07 07:42:14 +00:00
|
|
|
left={0}
|
|
|
|
maxWidth="100vw"
|
2023-07-01 14:13:27 +00:00
|
|
|
>
|
2023-07-01 09:46:36 +00:00
|
|
|
<Flex
|
2023-07-07 07:42:14 +00:00
|
|
|
as="nav"
|
|
|
|
position="relative"
|
|
|
|
alignItems="center"
|
|
|
|
justifyContent="center"
|
|
|
|
flexDirection="row"
|
|
|
|
width="100%"
|
|
|
|
maxWidth="100%"
|
|
|
|
marginY={1}
|
|
|
|
paddingX="12px"
|
|
|
|
paddingY="10px"
|
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
|
|
|
>
|
2023-08-09 00:43:18 +00:00
|
|
|
<Center
|
|
|
|
width="25px"
|
|
|
|
height="25px"
|
|
|
|
marginRight="auto"
|
|
|
|
transform="scaleX(-100%)"
|
|
|
|
cursor="pointer"
|
|
|
|
>
|
|
|
|
<Link to="/">
|
|
|
|
<Icon size="12px" name="unicorn"></Icon>
|
|
|
|
</Link>
|
|
|
|
</Center>
|
2023-08-12 12:22:52 +00:00
|
|
|
<Commander global id="nav"></Commander>
|
2023-08-09 00:43:18 +00:00
|
|
|
<Center
|
|
|
|
width="25px"
|
|
|
|
height="25px"
|
|
|
|
marginLeft="auto"
|
|
|
|
transform="scaleX(-100%)"
|
|
|
|
cursor="pointer"
|
|
|
|
>
|
|
|
|
<Icon size="12px" name="rainbow"></Icon>
|
|
|
|
</Center>
|
|
|
|
{/* <RainbowSkeleton
|
2023-07-07 07:42:14 +00:00
|
|
|
marginLeft="auto"
|
|
|
|
width="25px"
|
|
|
|
height="25px"
|
|
|
|
cursor="pointer"
|
2023-07-01 09:46:36 +00:00
|
|
|
onClick={toggleProfileDrawer}
|
2023-07-07 07:42:14 +00:00
|
|
|
background="rgba(0,0,0,0.1)"
|
2023-07-01 09:46:36 +00:00
|
|
|
sx={{}}
|
2023-07-07 07:42:14 +00:00
|
|
|
borderRadius="999px"
|
2023-08-09 00:43:18 +00:00
|
|
|
></RainbowSkeleton> */}
|
2023-07-01 09:46:36 +00:00
|
|
|
{/* <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
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|