Decouple RelinkDialog from NetworkStatusDialog
This commit is contained in:
parent
0970c73310
commit
4dc7631851
8 changed files with 123 additions and 37 deletions
19
ts/state/smart/RelinkDialog.tsx
Normal file
19
ts/state/smart/RelinkDialog.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { mapDispatchToProps } from '../actions';
|
||||
import { RelinkDialog } from '../../components/RelinkDialog';
|
||||
import { StateType } from '../reducer';
|
||||
import { getIntl } from '../selectors/user';
|
||||
import { hasNetworkDialog } from '../selectors/network';
|
||||
import { isDone } from '../../util/registration';
|
||||
|
||||
const mapStateToProps = (state: StateType) => {
|
||||
return {
|
||||
hasNetworkDialog: hasNetworkDialog(state),
|
||||
i18n: getIntl(state),
|
||||
isRegistrationDone: isDone(),
|
||||
};
|
||||
};
|
||||
|
||||
const smart = connect(mapStateToProps, mapDispatchToProps);
|
||||
|
||||
export const SmartRelinkDialog = smart(RelinkDialog);
|
Loading…
Add table
Add a link
Reference in a new issue