You've already forked mattermost-webapp
mirror of
https://github.com/zerotier/mattermost-webapp.git
synced 2026-05-22 16:23:25 -07:00
bdea28e42f
migrated settings and tutorial components, removed preference actions
33 lines
1.0 KiB
JavaScript
33 lines
1.0 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
import {connect} from 'react-redux';
|
|
import {bindActionCreators} from 'redux';
|
|
|
|
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
|
|
import {getInt} from 'mattermost-redux/selectors/entities/preferences';
|
|
import {savePreferences} from 'mattermost-redux/actions/preferences';
|
|
|
|
import {closeMenu as closeRhsMenu} from 'actions/views/rhs';
|
|
import {Preferences} from 'utils/constants.jsx';
|
|
|
|
import TutorialTip from './tutorial_tip.jsx';
|
|
|
|
function mapStateToProps(state) {
|
|
const currentUserId = getCurrentUserId(state);
|
|
return {
|
|
currentUserId,
|
|
step: getInt(state, Preferences.TUTORIAL_STEP, currentUserId, 0),
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
actions: bindActionCreators({
|
|
closeRhsMenu,
|
|
savePreferences,
|
|
}, dispatch),
|
|
};
|
|
}
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(TutorialTip);
|