Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2186: Hub Home view bug fix #628

Merged
merged 4 commits into from Oct 28, 2020
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Next

For clicks from promo modals, always open links in same window as panel

  • Loading branch information
wlycdgr committed Oct 6, 2020
commit 3108b166caca76736411b655d09c561c0a6da571
@@ -63,7 +63,7 @@ class PromoModal extends React.Component {
* Handle clicks on the download buttons
*/
_handlePromoTryProductClick = (product, utm_campaign) => {
const { actions } = this.props;
const { actions, tab_id } = this.props;
actions.togglePromoModal();

let url;
@@ -84,6 +84,7 @@ class PromoModal extends React.Component {
sendMessage('openNewTab', {
url,
become_active: true,
tab_id, // Make sure we open the tab in the window with the open extension panel, even if another window is active
});
}

@@ -199,6 +200,7 @@ PromoModal.propTypes = {
type: PropTypes.string.isRequired,
location: PropTypes.string,
isPlus: PropTypes.bool,
tab_id: PropTypes.number.isRequired,
};

PromoModal.defaultProps = {
@@ -11,6 +11,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/

import { connect } from 'react-redux';
import PromoModalContainer from './PromoModalContainer';

export default PromoModalContainer;
const mapStateToProps = state => ({ tab_id: state.panel.tab_id });

export default connect(mapStateToProps, undefined)(PromoModalContainer);
ProTip! Use n and p to navigate between commits in a pull request.