Skip to content

Commit

Permalink
feat: show external links - aave#1767
Browse files Browse the repository at this point in the history
  • Loading branch information
NandyBa committed Sep 16, 2023
1 parent 48ae432 commit 399e1c8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/components/AaveAlarmLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ export default function AaveAlarmLink() {
Android: 'https://play.google.com/store/apps/details?id=com.aavealarm&pcampaignid=web_share',
};

const handleMenuItemClick = (key: keyof Apps) => {
setAnchorEl(null);
window.open(Apps[key], '_blank');
};

const handleClose = () => {
setAnchorEl(null);
};
Expand Down Expand Up @@ -140,9 +135,15 @@ export default function AaveAlarmLink() {
<MenuList disablePadding sx={{ '.MuiMenuItem-root.Mui-disabled': { opacity: 1 } }}>
{Apps &&
Object.keys(Apps).map((key) => (
<MenuItem key={key} onClick={() => handleMenuItemClick(key as keyof Apps)}>
{key}
</MenuItem>
<Link
href={Apps[key as keyof Apps]}
sx={{ textDecoration: 'none' }}
target="_blank"
rel="noopener"
key={key}
>
<MenuItem>{key}</MenuItem>
</Link>
))}
</MenuList>
</Menu>
Expand Down

0 comments on commit 399e1c8

Please sign in to comment.