34 lines
769 B
JavaScript
34 lines
769 B
JavaScript
|
|
import React, { Component } from 'react';
|
||
|
|
import { bindActionCreators } from 'redux';
|
||
|
|
import { connect } from 'react-redux';
|
||
|
|
import AppBar from 'material-ui/AppBar';
|
||
|
|
import UserDisplay from '../user/user_display';
|
||
|
|
|
||
|
|
class ApplicationBar extends Component {
|
||
|
|
constructor(props) {
|
||
|
|
super(props);
|
||
|
|
this.state = {
|
||
|
|
}
|
||
|
|
}
|
||
|
|
render() {
|
||
|
|
|
||
|
|
return (
|
||
|
|
<AppBar
|
||
|
|
title={this.props.appBar.title}
|
||
|
|
iconElementRight={<UserDisplay />}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function mapStateToProps(state, props) {
|
||
|
|
return {
|
||
|
|
appBar: state.appBar
|
||
|
|
};
|
||
|
|
}
|
||
|
|
function mapDispatchToProps(dispatch) {
|
||
|
|
return {
|
||
|
|
/* actions: bindActionCreators(cartActions, dispatch) */
|
||
|
|
}
|
||
|
|
}
|
||
|
|
export default connect(mapStateToProps, mapDispatchToProps)(ApplicationBar);
|