import { connect } from "react-redux";

import { setDrawer } from "../actions";

import Drawer from "../components/Drawer";

const mapStateToProps = state => {
    return {
        user: state.user,
        open: state.drawer,
        authenticated: state.authenticated,
        showButton: state.drawerButton,
    };
};
const mapDispatchToProps = dispatch => {
    return {
        setDrawer: (show: boolean) => dispatch(setDrawer(show)),
    };
};

const DrawerContainer = connect(mapStateToProps,
    mapDispatchToProps)(Drawer);
export default DrawerContainer;
