Skip to content

Commit

Permalink
fix: Use html for linking to tax services (#6124)
Browse files Browse the repository at this point in the history
* Use html for linking to tax services

* Add target blank

* styling

* override default styling

---------

Co-authored-by: Lynn Yu <[email protected]>
  • Loading branch information
shortcircuit3 and Lynn Yu authored Mar 10, 2023
1 parent 6ab6f4d commit c1297b2
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/components/TaxServiceModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ const TOKEN_TAX_DESCRIPTION = 'Save 10% on all plans'
const COINTRACKER_DESCRIPTION = 'New and existing users save up to 20%'

function TaxServiceOption({ description, logo, url }: TaxServiceOptionProps) {
const openTaxServiceLink = () => {
window.open(url, '_blank')
}

return (
<TaxOption tabIndex={0}>
<StyledImageContainer as="img" src={logo} draggable={false} />
Expand All @@ -101,14 +97,11 @@ function TaxServiceOption({ description, logo, url }: TaxServiceOptionProps) {
: InterfaceElementName.TAX_SERVICE_COINTRACKER_BUTTON
}
>
<Button
size={ButtonSize.medium}
emphasis={ButtonEmphasis.medium}
onClick={openTaxServiceLink}
data-testid="tax-service-option-button"
>
Get started
</Button>
<a href={url} target="_blank" rel="noreferrer" style={{ textDecoration: 'none' }}>
<Button size={ButtonSize.medium} emphasis={ButtonEmphasis.medium} data-testid="tax-service-option-button">
Get started
</Button>
</a>
</TraceEvent>
</TaxOption>
)
Expand Down

0 comments on commit c1297b2

Please sign in to comment.