1 | import React from "react";
|
---|
2 | import { useState } from "react";
|
---|
3 | import { Col, Container, Row, Image, Button, Modal } from "react-bootstrap";
|
---|
4 | import Navigation from "../Components/Layout/Navbar/Navigation";
|
---|
5 | import { MdBusinessCenter } from "react-icons/md";
|
---|
6 | import DataForm from "../Components/ProfilePage/DataForm";
|
---|
7 | import LoginForm from "../Components/Login/LoginForm";
|
---|
8 | import ChangePasswordForm from "../Components/Forms/ChangePasswordForm";
|
---|
9 | import useGet from "../Components/Hooks/useGet";
|
---|
10 | import {useAuth} from "../Components/Context/AuthContext";
|
---|
11 | import {Navigate} from "react-router-dom";
|
---|
12 |
|
---|
13 | const ProfilePage = () => {
|
---|
14 |
|
---|
15 | const { data, setData, isLoading, getData } = useGet("/principal");
|
---|
16 |
|
---|
17 |
|
---|
18 |
|
---|
19 | const profileData = {
|
---|
20 | "name": "Марко",
|
---|
21 | "surname": "Марковски",
|
---|
22 | "address": "ул. Раскрсница бр. 10",
|
---|
23 | "dateOfBirth": "2002-01-01",
|
---|
24 | "country": "Македонија",
|
---|
25 | "zip": "1000",
|
---|
26 | "city": "Скопје",
|
---|
27 | "email": "user@mail.com",
|
---|
28 | "mobile": "075/500-000"
|
---|
29 | }
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 | return (
|
---|
34 | <>
|
---|
35 | <Navigation />
|
---|
36 | {!isLoading && <Container>
|
---|
37 | <Row className="mb-5">
|
---|
38 | <h2 style={{ color: "#159895", textAlign: "left" }}>Мојот профил</h2>
|
---|
39 | </Row>
|
---|
40 | <Row className="mb-5">
|
---|
41 | <Col>
|
---|
42 | <Row className="d-flex mb-3">
|
---|
43 | <Col className="d-flex justify-content-center" style={{maxWidth: "30%"}}>
|
---|
44 | <Image
|
---|
45 | src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"
|
---|
46 | style={{
|
---|
47 | height: "5em",
|
---|
48 | borderRadius: "50%",
|
---|
49 | maxWidth: "100%",
|
---|
50 | }}
|
---|
51 | className="m-auto"
|
---|
52 | ></Image>
|
---|
53 | </Col>
|
---|
54 | <Col className="d-flex justify-content-center">
|
---|
55 | <Container className="pt-2" style={{ textAlign: "left" }}>
|
---|
56 | <h4>{data.name + " " + data.surname}</h4>
|
---|
57 | <h5>{data.email}</h5>
|
---|
58 | </Container>
|
---|
59 | </Col>
|
---|
60 | </Row>
|
---|
61 | </Col>
|
---|
62 | <Col style={{textAlign: "right"}}>
|
---|
63 | <Button
|
---|
64 | type="button"
|
---|
65 | style={{ backgroundColor: "#159895", border: "2px solid white" }}
|
---|
66 | size="lg"
|
---|
67 | href="/resources"
|
---|
68 | >
|
---|
69 | <span className="ikona my-1" color="white">
|
---|
70 | <MdBusinessCenter style={{ color: "white" }} />
|
---|
71 | </span>
|
---|
72 | <span className="ikona mx-3">Мои ресурси</span>
|
---|
73 | </Button>
|
---|
74 | </Col>
|
---|
75 | </Row>
|
---|
76 | <Row className="mb-5">
|
---|
77 | {!isLoading && <DataForm data={data}></DataForm>}
|
---|
78 | </Row>
|
---|
79 | </Container>}
|
---|
80 | </>
|
---|
81 | );
|
---|
82 | };
|
---|
83 |
|
---|
84 | export default ProfilePage;
|
---|