-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Modals): move FAQ to flyout modal
- Loading branch information
Philip London
committed
Jan 19, 2020
1 parent
a89f428
commit 25623a1
Showing
20 changed files
with
93 additions
and
64 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/blockchain-wallet-v4-frontend/src/components/Flyout/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// export type E2EType = 'borrowModal' | 'xyzModal' | ||
export type E2EType = 'borrowModal' | ||
export type E2EType = 'borrowModal' | 'faqModal' |
2 changes: 1 addition & 1 deletion
2
packages/blockchain-wallet-v4-frontend/src/data/modals/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 15 additions & 14 deletions
29
...rc/layouts/Wallet/Header/FaqIcon/index.js → ...c/layouts/Wallet/Header/FaqIcon/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
import { bindActionCreators } from 'redux' | ||
import { connect } from 'react-redux' | ||
import React from 'react' | ||
|
||
import { actions, model } from 'data' | ||
import { getData } from './selectors' | ||
import { bindActionCreators, Dispatch } from 'redux' | ||
import { connect } from 'react-redux' | ||
import FaqIcon from './template' | ||
import React from 'react' | ||
|
||
const { GENERAL_EVENTS } = model.analytics | ||
class FaqIconContainer extends React.PureComponent { | ||
|
||
type LinkDispatchPropsType = { | ||
analyticsActions: typeof actions.analytics, | ||
modalActions: typeof actions.modals | ||
} | ||
|
||
class FaqIconContainer extends React.PureComponent<LinkDispatchPropsType> { | ||
onFaqClick = () => { | ||
this.props.actions.layoutWalletFaqClicked() | ||
this.props.modalActions.showModal('FAQ_MODAL') | ||
this.props.analyticsActions.logEvent(GENERAL_EVENTS.VIEW_WHATS_NEW) | ||
} | ||
render () { | ||
return ( | ||
<FaqIcon | ||
highlighted={this.props.highlighted} | ||
handleClick={this.onFaqClick} | ||
/> | ||
) | ||
} | ||
} | ||
|
||
const mapStateToProps = state => getData(state) | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
actions: bindActionCreators(actions.components.layoutWallet, dispatch), | ||
analyticsActions: bindActionCreators(actions.analytics, dispatch) | ||
const mapDispatchToProps = (dispatch: Dispatch): LinkDispatchPropsType => ({ | ||
analyticsActions: bindActionCreators(actions.analytics, dispatch), | ||
modalActions: bindActionCreators(actions.modals, dispatch) | ||
}) | ||
|
||
export default connect( | ||
mapStateToProps, | ||
null, | ||
mapDispatchToProps | ||
)(FaqIconContainer) |
12 changes: 0 additions & 12 deletions
12
packages/blockchain-wallet-v4-frontend/src/layouts/Wallet/Header/FaqIcon/selectors.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...outs/Wallet/TrayRight/Faq/FaqRow/index.js → ...4-frontend/src/modals/Faq/FaqRow/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/Wallet/TrayRight/Faq/FaqRow/template.js → ...rontend/src/modals/Faq/FaqRow/template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters