'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _reactRedux = require('react-redux');

var _ProtectedRoute = require('../../components/routes/ProtectedRoute');

var _ProtectedRoute2 = _interopRequireDefault(_ProtectedRoute);

var _reducers = require('../../reducers');

var _login = require('../../actions/login');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var mapStateToProps = function mapStateToProps(state) {
  return {
    username: (0, _reducers.getUserUsername)(state)
  };
};

var mapDispatchToProps = {
  redirectLogin: _login.redirectLogin
};

exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_ProtectedRoute2.default);