import React from "react";
import {connect} from 'react-redux';
import style from './userCabinet.module.sass';
import Navbar from '../navbar/navbar';
import ContactInfoPage from '../../userAndAdminCabinet/userCabinet/pages/contactInfo/contactInfo';

const UserCabinet = (props) => {



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

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

    return {
        page
    }
};



export default connect(mapStateToProps)(UserCabinet);