Skip to content

Commit

Permalink
Remove href / anchor tags from links that open new tabs using chrome.…
Browse files Browse the repository at this point in the history
…tabs API

The presence of href and anchor tag on top chrome.tabs usage causes 2 tabs to be opened in firefox
  • Loading branch information
nishanthvijayan committed Apr 6, 2019
1 parent 247636c commit 6e8a8ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/components/Containers/DonationsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ Buy me a Beer!
</p>
<br />
<br />
<a className="donation-button" onClick={onClickBeerDonationHandler} href={DONATE_BEER_URL} target="_blank">
<a className="donation-button" onClick={onClickBeerDonationHandler}>
Buy me a Beer! (₹200)
</a>
<a className="donation-button" onClick={onClickAnyDonationHandler} href={DONATE_ANY_AMOUNT_URL} target="_blank">
<a className="donation-button" onClick={onClickAnyDonationHandler}>
Donate any amount
</a>
</div>
Expand Down
4 changes: 1 addition & 3 deletions app/components/Contest.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ const Contest = React.createClass({
<div className="details-container">

<h2 className="contest-title" onClick={this.onClickContestTitle}>
<a className="no-decoration">
{this.props.contest.name}
</a>
{this.props.contest.name}
</h2>

<HideContestButton
Expand Down
14 changes: 6 additions & 8 deletions app/components/Contest/AddToCalendarButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ const AddToCalendarButton = ({ contest, type, visible }) => {
}

return (
<a href={contest.createGoogleAddToCalendarUrl()} target="_blank">
<i
className="fa fa-calendar fa-lg option-icon circular-border"
style={{ color: '#4caf50', cursor: 'pointer' }}
onClick={onClickAddToCalendarButton}
title="Add to Google Calendar"
/>
</a>
<i
className="fa fa-calendar fa-lg option-icon circular-border"
style={{ color: '#4caf50', cursor: 'pointer' }}
onClick={onClickAddToCalendarButton}
title="Add to Google Calendar"
/>
);
};

Expand Down

0 comments on commit 6e8a8ad

Please sign in to comment.