import { actionAuthLogout } from "../actions/actionAuthLogout";
import React from "react";
import { connect } from "react-redux";

const Cabinet = ({ onLogOut }) => {
  return (
    <>
      <div>
        <div>
          <div >
            <a href="/projects">
              <button type="button">My Projects</button>
            </a>
            <div>
              <a href="/">
                <button>Main Page</button>
              </a>
            </div>
            <button onClick={() => onLogOut()}>Log out</button>
          </div>
        </div>
      </div>
    </>
  );
};

const ConnectCabinet = connect(null, { onLogOut: actionAuthLogout })(Cabinet);

export default ConnectCabinet;