Skip to content

Commit f661dca

Browse files
vidvidvidalalonde
authored andcommitted
feat: add dashboard link and icons to profile menu
1 parent 7ee77db commit f661dca

File tree

6 files changed

+102
-4
lines changed

6 files changed

+102
-4
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { createIcon } from '@chakra-ui/icons';
2+
import * as React from 'react';
3+
4+
export const Dashboard = createIcon({
5+
displayName: 'Dashboard',
6+
path: (
7+
<g>
8+
<path d="M57,12H7a3.00328,3.00328,0,0,0-3,3V49a3.00327,3.00327,0,0,0,3,3H57a3.00327,3.00327,0,0,0,3-3V15A3.00328,3.00328,0,0,0,57,12ZM6,15a1.00127,1.00127,0,0,1,1-1H57a1.00127,1.00127,0,0,1,1,1v3H6ZM58,49a1.00126,1.00126,0,0,1-1,1H7a1.00126,1.00126,0,0,1-1-1V20H58Z" />
9+
<path d="M55.0098 15H55a1.00491 1.00491 0 1 0 .0098 0zM51 15h-.0098A1.00491 1.00491 0 1 0 51 15zM47.0049 15h-.0098a1.00491 1.00491 0 1 0 .0098 0zM9 24h7a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2zM9 28h7a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2zM9 32h7a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2zM9 36h7a1 1 0 0 0 0-2H9a1 1 0 0 0 0 2zM39 34h8.8188a.99938.99938 0 0 0 .9834-1.18069 11.95632 11.95632 0 0 0-3.0557-6.0119L46.6255 25H51a1 1 0 0 0 0-2H46a1.00007 1.00007 0 0 0-.8994.56251l-.8999 1.8499a11.916 11.916 0 0 0-5.02-2.2146A.99939.99939 0 0 0 38 24.18121V33A1.0001 1.0001 0 0 0 39 34zm1-8.542A10.06564 10.06564 0 0 1 46.542 32H40zM55 25h.0098A1.00491 1.00491 0 1 0 55 25z" />
10+
<path d="M55 26H52a1 1 0 0 0 0 2h3a1 1 0 0 0 0-2zM27.5703 42.56251L26.3843 45H22.0098a1 1 0 0 0 0 2h5a1.00005 1.00005 0 0 0 .8994-.56249l1.1844-2.4337a11.97973 11.97973 0 0 0 19.7086-6.8231A.9994.9994 0 0 0 47.8188 36H36V24.18121a.99939.99939 0 0 0-1.1807-.9834 11.985 11.985 0 0 0-7.1864 19.2829A.926.926 0 0 0 27.5703 42.56251zM34 25.45651V37a1.0001 1.0001 0 0 0 1 1H46.5435A10.00237 10.00237 0 1 1 34 25.45651zM18.0098 47a1 1 0 0 0 0-2H18a1 1 0 0 0 .0098 2z" />
11+
<path d="M18.0098,44h3a1,1,0,0,0,0-2h-3a1,1,0,0,0,0,2Z" />
12+
</g>
13+
),
14+
viewBox: '0 0 64 64',
15+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { createIcon } from '@chakra-ui/icons';
2+
import * as React from 'react';
3+
4+
export const LogOut = createIcon({
5+
displayName: 'LogOut',
6+
path: (
7+
<g>
8+
<g>
9+
<path d="m2 12 5 4v-3h9v-2H7V8z" />
10+
</g>
11+
<g>
12+
<path d="M13.001 2.999a8.938 8.938 0 0 0-6.364 2.637L8.051 7.05c1.322-1.322 3.08-2.051 4.95-2.051s3.628.729 4.95 2.051 2.051 3.08 2.051 4.95-.729 3.628-2.051 4.95-3.08 2.051-4.95 2.051-3.628-.729-4.95-2.051l-1.414 1.414c1.699 1.7 3.959 2.637 6.364 2.637s4.665-.937 6.364-2.637c1.7-1.699 2.637-3.959 2.637-6.364s-.937-4.665-2.637-6.364a8.938 8.938 0 0 0-6.364-2.637z" />
13+
</g>
14+
</g>
15+
),
16+
viewBox: '0 0 24 24',
17+
});
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { createIcon } from '@chakra-ui/icons';
2+
import * as React from 'react';
3+
4+
export const Profile = createIcon({
5+
displayName: 'Profile',
6+
path: (
7+
<g>
8+
<g>
9+
<path
10+
fill-rule="evenodd"
11+
clip-rule="evenodd"
12+
d="M16 9C16 11.2091 14.2091 13 12 13C9.79086 13 8 11.2091 8 9C8 6.79086 9.79086 5 12 5C14.2091 5 16 6.79086 16 9ZM14 9C14 10.1046 13.1046 11 12 11C10.8954 11 10 10.1046 10 9C10 7.89543 10.8954 7 12 7C13.1046 7 14 7.89543 14 9Z"
13+
fill="currentColor"
14+
/>
15+
</g>
16+
<g>
17+
<path
18+
fill-rule="evenodd"
19+
clip-rule="evenodd"
20+
d="M12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1ZM3 12C3 14.0902 3.71255 16.014 4.90798 17.5417C6.55245 15.3889 9.14627 14 12.0645 14C14.9448 14 17.5092 15.3531 19.1565 17.4583C20.313 15.9443 21 14.0524 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12ZM12 21C9.84977 21 7.87565 20.2459 6.32767 18.9878C7.59352 17.1812 9.69106 16 12.0645 16C14.4084 16 16.4833 17.1521 17.7538 18.9209C16.1939 20.2191 14.1881 21 12 21Z"
21+
fill="currentColor"
22+
/>
23+
</g>
24+
</g>
25+
),
26+
viewBox: '0 0 24 24',
27+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
export { BrightIdIcon } from './BrightIdIcon';
2+
export { Dashboard } from './Dashboard';
23
export { DropDownIcon } from './DropDownIcon';
34
export { Icon3box } from './Icon3box';
5+
export { LogOut } from './LogOut';
6+
export { Profile } from './Profile';

packages/web/components/MegaMenu.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ import {
66
ChevronDownIcon,
77
ChevronUpIcon,
88
CloseIcon,
9+
Dashboard,
910
Flex,
1011
HamburgerIcon,
1112
Icon,
1213
Link,
14+
LogOut,
1315
Menu,
1416
MenuButton,
1517
MenuItem,
1618
MenuList,
1719
MetaButton,
20+
Profile,
1821
SimpleGrid,
1922
Spinner,
2023
Stack,
@@ -404,9 +407,24 @@ const PlayerStats: React.FC<PlayerStatsProps> = ({ player }) => {
404407
href={`/player/${player.username}`}
405408
_hover={{ textDecoration: 'none' }}
406409
>
407-
<MenuItem>View Profile</MenuItem>
410+
<MenuItem>
411+
<Profile w={4} h={4} mr={4} /> View Profile
412+
</MenuItem>
408413
</MetaLink>
409-
<MenuItem onClick={disconnect}>Disconnect</MenuItem>
414+
<MetaLink
415+
color="black"
416+
href={'/dashboard'}
417+
_hover={{ textDecoration: 'none' }}
418+
>
419+
<MenuItem>
420+
<Dashboard w={4} h={4} mr={4} color="red.500" />
421+
Dashboard
422+
</MenuItem>
423+
</MetaLink>
424+
<MenuItem onClick={disconnect}>
425+
<LogOut w={4} h={4} mr={4} />
426+
Disconnect
427+
</MenuItem>
410428
</MenuList>
411429
</Menu>
412430
</Flex>

packages/web/components/PlayerStatsBar.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import {
22
Avatar,
33
Badge,
4+
Dashboard,
45
Flex,
56
Image,
7+
LogOut,
68
Menu,
79
MenuButton,
810
MenuItem,
911
MenuList,
12+
Profile,
1013
Stack,
1114
Text,
1215
} from '@metafam/ds';
@@ -70,9 +73,24 @@ const PlayerStats = () => {
7073
href={`/player/${getPlayerName(user.player)}`}
7174
_hover={{ textDecoration: 'none' }}
7275
>
73-
<MenuItem>View Profile</MenuItem>
76+
<MenuItem>
77+
<Profile w={4} h={4} mr={4} /> View Profile
78+
</MenuItem>
7479
</MetaLink>
75-
<MenuItem onClick={disconnect}>Disconnect</MenuItem>
80+
<MetaLink
81+
color="black"
82+
href={'/dashboard'}
83+
_hover={{ textDecoration: 'none' }}
84+
>
85+
<MenuItem>
86+
<Dashboard w={4} h={4} mr={4} color="red.500" />
87+
Dashboard
88+
</MenuItem>
89+
</MetaLink>
90+
<MenuItem onClick={disconnect}>
91+
<LogOut w={4} h={4} mr={4} />
92+
Disconnect
93+
</MenuItem>
7694
</MenuList>
7795
</Menu>
7896
<Stack my={2} ml={2}>

0 commit comments

Comments
 (0)