cabinet.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import React from "react";
  2. import { connect } from "react-redux";
  3. import ConnectNickName from "../components/nick";
  4. import ImgProfile from "../components/profile";
  5. import ConUpload from "./upload";
  6. import { actionAuthLogout } from "../actions/actionAuthLogout";
  7. const Cabinet = ({ onLogOut }) => {
  8. return (
  9. <>
  10. <div className="container d-flex justify-content-center align-items-center mt-5 mb-5" >
  11. <div className="card" style = {{boxShadow:'7px 5px 10px 2px rgba(34, 60, 80, 0.2)'}}>
  12. <div className="upper">
  13. {" "}
  14. <ImgProfile px={"300px"} />{" "}
  15. </div>
  16. <div className="user text-center">
  17. <div className="profile mt-3">
  18. {" "}
  19. <ConUpload width={"100px"} />{" "}
  20. </div>
  21. </div>
  22. <div className="mt-5 text-center">
  23. <h4 className="mb-0">
  24. <ConnectNickName />
  25. </h4>
  26. <a href="/projects">
  27. <button type="button" className="btn btn-outline-success border-success">
  28. My Projects
  29. </button>
  30. </a>
  31. <div className="d-flex justify-content-center align-items-center mt-4 px-4">
  32. <a href="/">
  33. <button className="btn btn-primary btn-sm mb-3 ">
  34. Main Page
  35. </button>
  36. </a>
  37. </div>
  38. <button
  39. className="btn btn-secondary btn-sm mb-3"
  40. onClick={() => onLogOut() }
  41. >
  42. Log out
  43. </button>
  44. </div>
  45. </div>
  46. </div>
  47. </>
  48. );
  49. };
  50. const ConnectCabinet = connect(null, { onLogOut: actionAuthLogout })(Cabinet);
  51. export default ConnectCabinet;