'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _Header = require('../sections/Header');

var _Header2 = _interopRequireDefault(_Header);

var _Footer = require('../sections/Footer');

var _Footer2 = _interopRequireDefault(_Footer);

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

var propTypes = {
  history: _propTypes2.default.object,
  username: _propTypes2.default.string.isRequired,
  children: _propTypes2.default.node
};

function ProtectedPage(props) {
  var history = props.history,
      username = props.username,
      children = props.children;


  return _react2.default.createElement(
    'div',
    null,
    _react2.default.createElement(_Header2.default, { history: history, username: username }),
    children,
    _react2.default.createElement(_Footer2.default, null)
  );
}

ProtectedPage.propTypes = propTypes;