Decouple RelinkDialog from NetworkStatusDialog

This commit is contained in:
Josh Perez 2020-04-16 15:20:52 -04:00 committed by GitHub
parent 0970c73310
commit 4dc7631851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 123 additions and 37 deletions

View 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);