3719a73c81
- Don't want to show it in Incognito. - Only show it in when entered from homepage, or in the Help page. - Record the hash of the viewed announcement and update the wallet with it.
20 lines
724 B
JavaScript
20 lines
724 B
JavaScript
import ModalAnnouncements from './view';
|
|
import { connect } from 'react-redux';
|
|
import { doHideModal } from 'redux/actions/app';
|
|
import { doSetLastViewedAnnouncement } from 'redux/actions/content';
|
|
import { selectLastViewedAnnouncement } from 'redux/selectors/content';
|
|
import { selectHomepageAnnouncement } from 'redux/selectors/settings';
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
|
|
const select = (state) => ({
|
|
authenticated: selectUserVerifiedEmail(state),
|
|
announcement: selectHomepageAnnouncement(state),
|
|
lastViewedHash: selectLastViewedAnnouncement(state),
|
|
});
|
|
|
|
const perform = {
|
|
doHideModal,
|
|
doSetLastViewedAnnouncement,
|
|
};
|
|
|
|
export default connect(select, perform)(ModalAnnouncements);
|