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