Skip to content

Commit

Permalink
feat(menu): cyberver link (#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
happylolonly authored Jun 13, 2024
1 parent da4648b commit ab7997c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/appMenu/AppMenu.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../../style/mixins.scss';

.bookmarks {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -38,3 +40,10 @@
color: #32d9ae;
}
}

.external {
width: 20px;
height: 20px;

@include withShareIcon;
}
5 changes: 5 additions & 0 deletions src/components/appMenu/AppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ interface Props {
}

function Items({ item, selected, onClick }: Props) {
const isExternal = item.to.startsWith('http');

return (
<NavLink
to={item.to}
className={() => {
return cx(styles.bookmarks__item, { [styles.active]: selected });
}}
onClick={onClick}
{...(isExternal && { target: '_blank', rel: 'noreferrer noopener' })}
>
<Pane display="flex" paddingY={5} alignItems="center" key={item.name}>
<div
Expand All @@ -46,6 +49,8 @@ function Items({ item, selected, onClick }: Props) {
display="flex"
>
{item.name}

{isExternal && <span className={styles.external}></span>}
</Pane>
</div>
</Pane>
Expand Down
7 changes: 7 additions & 0 deletions src/containers/application/AppMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ const itemsMenu = () => {
// ],
// },
{ name: 'Senate', icon: senate, to: '/senate', subItems: [] },

{
name: 'Cyberver 🟣',
icon: require('./images/cyberver.png'),
to: 'https://spacepussy.ai/cyberver',
subItems: [],
},
{ name: 'About', icon: congress, to: routes.social.path, subItems: [] },
// {
// name: 'Help',
Expand Down
Binary file added src/containers/application/images/cyberver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ab7997c

Please sign in to comment.