Skip to content

Commit

Permalink
Warning banner opens URL in browser (#7057)
Browse files Browse the repository at this point in the history
* use openURL in Topbanner
  • Loading branch information
lvndry committed Jun 11, 2024
1 parent b7ad694 commit cb6a975
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/slimy-jokes-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": patch
---

Top Banner open url in browser
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import IconCross from "~/renderer/icons/Cross";
import Box from "~/renderer/components/Box";
import { Link } from "@ledgerhq/react-ui";
import theme from "@ledgerhq/react-ui/styles/theme";
import { openURL } from "../linking";

const IconContainer = styled.div`
margin-right: 12px;
Expand Down Expand Up @@ -117,7 +118,11 @@ const TopBanner = ({
{right && <RightContainer>{right}</RightContainer>}
{link && (
<LinkContainer>
<Link href={link.href} style={{ color: theme.colors.neutral.c100 }} alwaysUnderline>
<Link
style={{ color: theme.colors.neutral.c100 }}
alwaysUnderline
onClick={() => openURL(link.href)}
>
{link.text}
</Link>
</LinkContainer>
Expand Down

0 comments on commit cb6a975

Please sign in to comment.