-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
onboarding exit button always visible
New modals logic do not require hiding "exit" button from onboarding if device is not ready to work with. It also somewhat mitigates #1046 Seems like if there are less renders, the chance it happens is smaller.
- Loading branch information
Showing
3 changed files
with
13 additions
and
26 deletions.
There are no files selected for viewing
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
10 changes: 3 additions & 7 deletions
10
packages/suite/src/views/onboarding/steps/Welcome/Container.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,21 +1,17 @@ | ||
import { bindActionCreators } from 'redux'; | ||
import { connect } from 'react-redux'; | ||
import { AppState, Dispatch } from '@suite-types'; | ||
import { Dispatch } from '@suite-types'; | ||
import * as suiteActions from '@suite-actions/suiteActions'; | ||
import * as onboardingActions from '@onboarding-actions/onboardingActions'; | ||
|
||
import Step from './index'; | ||
|
||
const mapStateToProps = (state: AppState) => ({ | ||
device: state.suite.device, | ||
}); | ||
|
||
const mapDispatchToProps = (dispatch: Dispatch) => ({ | ||
goToNextStep: bindActionCreators(onboardingActions.goToNextStep, dispatch), | ||
addPath: bindActionCreators(onboardingActions.addPath, dispatch), | ||
closeModalApp: bindActionCreators(suiteActions.closeModalApp, dispatch), | ||
}); | ||
|
||
export type Props = ReturnType<typeof mapStateToProps> & ReturnType<typeof mapDispatchToProps>; | ||
export type Props = ReturnType<typeof mapDispatchToProps>; | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(Step); | ||
export default connect(null, mapDispatchToProps)(Step); |
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