Added ability to go back to team selection from channel view (#139)
This commit is contained in:
parent
d2f2678880
commit
39a101822c
2 changed files with 8 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ const Styles = StyleSheet.create({
|
|||
export default class RightSidebarMenu extends React.Component {
|
||||
static propTypes = {
|
||||
actions: React.PropTypes.shape({
|
||||
goBack: React.PropTypes.func.isRequired,
|
||||
goToFlaggedPosts: React.PropTypes.func.isRequired,
|
||||
goToRecentMentions: React.PropTypes.func.isRequired,
|
||||
logout: React.PropTypes.func.isRequired
|
||||
|
|
@ -56,6 +57,10 @@ export default class RightSidebarMenu extends React.Component {
|
|||
this.props.actions.goToFlaggedPosts();
|
||||
}
|
||||
|
||||
goToTeamSelection = () => {
|
||||
this.props.actions.goBack();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<ScrollView style={Styles.container}>
|
||||
|
|
@ -135,7 +140,7 @@ export default class RightSidebarMenu extends React.Component {
|
|||
defaultMessage='Manage Members'
|
||||
/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Item onPress={this.goToTeamSelection}>
|
||||
<Icon
|
||||
style={Styles.icon}
|
||||
name='exchange'
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import {bindActionCreators} from 'redux';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {goToFlaggedPosts, goToRecentMentions} from 'app/actions/navigation';
|
||||
import {goBack, goToFlaggedPosts, goToRecentMentions} from 'app/actions/navigation';
|
||||
import {logout} from 'service/actions/users';
|
||||
|
||||
import RightSidebarMenu from './right_sidebar_menu';
|
||||
|
|
@ -16,6 +16,7 @@ function mapStateToProps(state, ownProps) {
|
|||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
goBack,
|
||||
goToFlaggedPosts,
|
||||
goToRecentMentions,
|
||||
logout
|
||||
|
|
|
|||
Loading…
Reference in a new issue