import { connect } from 'react-redux';
import { StoreState } from 'store/rootReducer';

import { withRouter } from 'react-router';
import Nav from './Nav';

const mapStateToProps = (state: StoreState) => ({
  profile: state.account.profile && state.account.profile.data,
  accountResource: state.account.selectedResource,
});

const mapDispatchToProps = {};

const Wrapped = connect(mapStateToProps, mapDispatchToProps)(Nav);

export default withRouter(Wrapped);
