import React from "react";
import { withRouter } from "react-router-dom";
import ServerAvailabilityProvider from "../../features/server/providers/ServerAvailabilityProvider";

// components
import Header from "../Header/Header";
import Sidebar from "../Sidebar";
import Content from "./Content";

// styles
import useStyles from "./styles";

function Layout(props) {
  var classes = useStyles();

  return (
    <ServerAvailabilityProvider>
      <div className={classes.root}>
        <Header history={props.history} />
        <Sidebar />
        <Content />
      </div>
    </ServerAvailabilityProvider>
  );
}

export default withRouter(Layout);
