import React from 'react';
import style from './adminCabinet.module.sass';
import {connect} from 'react-redux';
import Orders from './pages/orders/orders';
import Navbar from "../navbar/navbar";


const AdminCabinet = (props) => {

    return(
        <div className={style.mainContainer}>
            <Navbar/>
            {
                props.page || <Orders/>
            }
        </div>
    )
};

const mapStateToProps = state => {
    const {page} = state.pageForCabinetReducers;

    return {
        page
    }
};

export default connect(mapStateToProps)(AdminCabinet);