cabinet.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import React from "react";
  2. import { connect } from "react-redux";
  3. import { Link } from "react-router-dom";
  4. import CNickName from "../components/nick";
  5. import ImgProfile from "../components/profile";
  6. import { actionAuthLogout } from "../actions/actionAuthLogout";
  7. import ConUpload from "./upload";
  8. const Cabinet = ({onLogOut}) => {
  9. return (
  10. <>
  11. <Link to="/">
  12. <button className="float-left btn-secondary d-inline-block mt-2 ml-2">
  13. <span>&#8617;</span> Back to Main Page
  14. </button>
  15. </Link>
  16. <br/>
  17. <br/>
  18. <div className="container d-flex justify-content-center align-items-center mt-2 mb-2" style={{border: '1px olid black'}}>
  19. <div className="card" style = {{boxShadow:'7px 5px 10px 2px rgba(34, 60, 80, 0.8)', width: "400px", height: '500px'}}>
  20. <h4 id="myStyle"><CNickName/></h4>
  21. <div className="upper" style={{paddingBottom: "35px"}}>
  22. <div className="user text-center">
  23. <div className="profile mt-3">
  24. <ConUpload/>
  25. </div>
  26. </div>
  27. </div>
  28. <div className="user text-center mt-2" >
  29. <a href="/projects" >
  30. <button type="button" className="btn btn-warning btn-sm">My Projects</button>
  31. </a>
  32. <div style={{marginTop:"10px"}}>
  33. <Link to="/search">
  34. <button className="btn btn-info btn-sm">Search</button>
  35. </Link>
  36. </div>
  37. <div style={{marginTop:"10px"}}>
  38. <Link to= "/changePass">
  39. <button className="btn btn-info btn-sm">Change pass</button>
  40. </Link>
  41. </div>
  42. </div>
  43. <div className="d-flex justify-content-around" style={{marginTop: '70px'}}>
  44. <a href="/">
  45. <button className="btn btn-success btn-sm">Main Page</button>
  46. </a>
  47. <button className="btn btn-danger btn-sm"
  48. onClick={() => onLogOut()}>
  49. Log out
  50. </button>
  51. </div>
  52. <span className="text-center" style={{paddingTop: "13%"}}>⚠click on your avatar to change it⚠</span>
  53. </div>
  54. </div>
  55. </>
  56. );
  57. };
  58. const ConnectCabinet = connect(null, {onLogOut: actionAuthLogout})(Cabinet);
  59. export default ConnectCabinet;