Skip to content
This repository was archived by the owner on Dec 26, 2023. It is now read-only.

Commit e543dd4

Browse files
with-heartOrlundoHubbardjcstein
committed
refactor: remove unnecessary Fragment
Co-authored-by: Orlundo Hubbard <[email protected]> Co-authored-by: Josh Stein <[email protected]>
1 parent 8aec674 commit e543dd4

File tree

1 file changed

+89
-97
lines changed

1 file changed

+89
-97
lines changed

frontend/src/components/Nav/index.tsx

Lines changed: 89 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -23,115 +23,107 @@ export default function Gslr() {
2323
const { t } = useTranslation();
2424

2525
return (
26-
<React.Fragment>
27-
<chakra.header
28-
bg={bg}
29-
w="full"
30-
px={{ base: 2, sm: 4 }}
31-
py={4}
32-
shadow="md"
33-
>
34-
<Flex alignItems="center" justifyContent="space-between" mx="auto">
35-
<Flex>
36-
<chakra.a
37-
href="/"
38-
title="Choc Home Page"
39-
display="flex"
40-
alignItems="center"
41-
>
42-
<Logo h={7} w={7} />
43-
</chakra.a>
44-
<chakra.h1 fontSize="m" fontWeight="medium" ml="2">
45-
Developer DAO
46-
</chakra.h1>
47-
</Flex>
48-
<HStack display="flex" alignItems="center" spacing={1}>
49-
<HStack
50-
spacing={5}
51-
mr={1}
52-
color="brand.500"
53-
display={{ base: 'none', md: 'inline-flex' }}
26+
<chakra.header bg={bg} w="full" px={{ base: 2, sm: 4 }} py={4} shadow="md">
27+
<Flex alignItems="center" justifyContent="space-between" mx="auto">
28+
<Flex>
29+
<chakra.a
30+
href="/"
31+
title="Choc Home Page"
32+
display="flex"
33+
alignItems="center"
34+
>
35+
<Logo h={7} w={7} />
36+
</chakra.a>
37+
<chakra.h1 fontSize="m" fontWeight="medium" ml="2">
38+
Developer DAO
39+
</chakra.h1>
40+
</Flex>
41+
<HStack display="flex" alignItems="center" spacing={1}>
42+
<HStack
43+
spacing={5}
44+
mr={1}
45+
color="brand.500"
46+
display={{ base: 'none', md: 'inline-flex' }}
47+
>
48+
<Link href="/" passHref>
49+
{t('home')}
50+
</Link>
51+
<Link href="/mint" passHref>
52+
{t('mintTokenText')}
53+
</Link>
54+
<Link href="/projects" passHref>
55+
{t('projects')}
56+
</Link>
57+
<IconGitHub
58+
h={7}
59+
w={7}
60+
opacity={0.6}
61+
transition="opacity 300ms ease-in-out"
62+
_hover={{ opacity: 1 }}
63+
/>
64+
</HStack>
65+
66+
<Box display={{ base: 'inline-flex', md: 'none' }}>
67+
<IconButton
68+
display={{ base: 'flex', md: 'none' }}
69+
aria-label="Open menu"
70+
fontSize="20px"
71+
color={useColorModeValue('grey.800', 'inherit')}
72+
variant="ghost"
73+
icon={<AiOutlineMenu />}
74+
onClick={mobileNav.onOpen}
75+
/>
76+
77+
<VStack
78+
pos="absolute"
79+
top={2}
80+
left={0}
81+
right={0}
82+
display={mobileNav.isOpen ? 'flex' : 'none'}
83+
flexDirection="column"
84+
pt={7}
85+
pb={7}
86+
m={0}
87+
bg={bg}
88+
spacing={3}
89+
rounded="sm"
90+
shadow="sm"
5491
>
92+
<CloseButton
93+
aria-label="Close menu"
94+
onClick={mobileNav.onClose}
95+
/>
96+
5597
<Link href="/" passHref>
5698
{t('home')}
5799
</Link>
100+
58101
<Link href="/mint" passHref>
59102
{t('mintTokenText')}
60103
</Link>
104+
61105
<Link href="/projects" passHref>
62106
{t('projects')}
63107
</Link>
64-
<IconGitHub
65-
h={7}
66-
w={7}
67-
opacity={0.6}
68-
transition="opacity 300ms ease-in-out"
69-
_hover={{ opacity: 1 }}
70-
/>
71-
</HStack>
72-
73-
<Box display={{ base: 'inline-flex', md: 'none' }}>
74-
<IconButton
75-
display={{ base: 'flex', md: 'none' }}
76-
aria-label="Open menu"
77-
fontSize="20px"
78-
color={useColorModeValue('grey.800', 'inherit')}
79-
variant="ghost"
80-
icon={<AiOutlineMenu />}
81-
onClick={mobileNav.onOpen}
82-
/>
83108

84-
<VStack
85-
pos="absolute"
86-
top={2}
87-
left={0}
88-
right={0}
89-
display={mobileNav.isOpen ? 'flex' : 'none'}
90-
flexDirection="column"
91-
pt={7}
92-
pb={7}
93-
m={0}
94-
bg={bg}
95-
spacing={3}
96-
rounded="sm"
97-
shadow="sm"
109+
<chakra.a
110+
href="https://github.com/Developer-DAO/developer-dao"
111+
target="_blank"
112+
rel="noreferrer"
113+
title={t('daoGithubRepo')}
98114
>
99-
<CloseButton
100-
aria-label="Close menu"
101-
onClick={mobileNav.onClose}
115+
<IconGitHub
116+
h={7}
117+
w={7}
118+
opacity={0.6}
119+
transition="opacity 300ms ease-in-out"
120+
_hover={{ opacity: 1 }}
102121
/>
103-
104-
<Link href="/" passHref>
105-
{t('home')}
106-
</Link>
107-
108-
<Link href="/mint" passHref>
109-
{t('mintTokenText')}
110-
</Link>
111-
112-
<Link href="/projects" passHref>
113-
{t('projects')}
114-
</Link>
115-
116-
<chakra.a
117-
href="https://github.com/Developer-DAO/developer-dao"
118-
target="_blank"
119-
rel="noreferrer"
120-
title={t('daoGithubRepo')}
121-
>
122-
<IconGitHub
123-
h={7}
124-
w={7}
125-
opacity={0.6}
126-
transition="opacity 300ms ease-in-out"
127-
_hover={{ opacity: 1 }}
128-
/>
129-
</chakra.a>
130-
</VStack>
131-
</Box>
132-
</HStack>
133-
</Flex>
134-
</chakra.header>
135-
</React.Fragment>
122+
</chakra.a>
123+
</VStack>
124+
</Box>
125+
</HStack>
126+
</Flex>
127+
</chakra.header>
136128
);
137129
}

0 commit comments

Comments
 (0)