Skip to content

Commit

Permalink
fix: open link in new tab, close banner on link open
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel-Develops committed Nov 27, 2024
1 parent 82543e4 commit 52fa207
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ export function Banner({
</p>
)}
{!!rest.linkText && (
<a className={cn(defaultStyles.link, styles.link)} href={rest.linkTo}>
<a
onClick={() => setShowBanner(false)}
className={cn(defaultStyles.link, styles.link)}
href={rest.linkTo}
target="_blank"
rel="noreferrer"
>
{rest.linkText}
</a>
)}
Expand Down

0 comments on commit 52fa207

Please sign in to comment.