Ignore:
Timestamp:
01/16/24 16:34:03 (9 months ago)
Author:
darsov2 <62809499+darsov2@…>
Branches:
master
Children:
07f4e8b
Parents:
e6c2521
Message:

revert

File:
1 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/Pages/ResourcesPage.js

    re6c2521 r5528b99  
    11import React from "react";
    2 import {Container, Col, Row, Image} from "react-bootstrap";
     2import { Container, Col, Row, Image } from "react-bootstrap";
    33import Navigation from "../Components/Layout/Navbar/Navigation";
    44import ResourcesTab from "../Components/Resources/ResourcesTab";
    5 import {useState} from "react";
     5import { useState } from "react";
    66import useGet from "../Components/Hooks/useGet";
    7 import {useAuth} from "../Components/Context/AuthContext";
    8 import {Navigate} from "react-router-dom";
    97
    108const ResourcesPage = (props) => {
    119
    12     const Auth = useAuth();
    13     const user = Auth.getUser();
     10  console.log(props.tab)
     11  const { data, setData, isLoading, getData } = useGet("/principal");
    1412
    15     return (
    16         <>
    17             <Navigation/>
    18             {<Container>
    19                 <Row className="mb-5">
    20                     <h2 style={{color: "#159895", textAlign: "left"}}>Мои ресурси</h2>
    21                 </Row>
    22                 <Row className="mb-5">
    23                     <Col>
    24                         <Row className="d-flex mb-3">
    25                             <Col
    26                                 className="d-flex justify-content-center"
    27                                 style={{maxWidth: "30%"}}
    28                             >
    29                                 <Image
    30                                     src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"
    31                                     style={{
    32                                         height: "5em",
    33                                         borderRadius: "50%",
    34                                         maxWidth: "100%",
    35                                     }}
    36                                     className="m-auto"
    37                                 ></Image>
    38                             </Col>
    39                             <Col className="d-flex justify-content-center">
    40                                 <Container className="pt-2" style={{textAlign: "left"}}>
    41                                     <h4>{user.name + " " + user.surname}</h4>
    42                                     <h5>{user.username}</h5>
    43                                 </Container>
    44                             </Col>
    45                         </Row>
    46                     </Col>
    47                 </Row>
    48                 <Row>
    49                     <ResourcesTab tab={props.tab}></ResourcesTab>
    50                 </Row>
    51             </Container>}
    52         </>
    53     );
     13
     14  return (
     15    <>
     16      <Navigation />
     17{!isLoading && <Container>
     18        <Row className="mb-5">
     19          <h2 style={{ color: "#159895", textAlign: "left" }}>Мои ресурси</h2>
     20        </Row>
     21        <Row className="mb-5">
     22          <Col>
     23            <Row className="d-flex mb-3">
     24              <Col
     25                className="d-flex justify-content-center"
     26                style={{ maxWidth: "30%" }}
     27              >
     28                <Image
     29                  src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"
     30                  style={{
     31                    height: "5em",
     32                    borderRadius: "50%",
     33                    maxWidth: "100%",
     34                  }}
     35                  className="m-auto"
     36                ></Image>
     37              </Col>
     38              <Col className="d-flex justify-content-center">
     39                <Container className="pt-2" style={{ textAlign: "left" }}>
     40                  <h4>{data.name + " " + data.surname}</h4>
     41                  <h5>{data.email}</h5>
     42                </Container>
     43              </Col>
     44            </Row>
     45          </Col>
     46        </Row>
     47        <Row>
     48            <ResourcesTab tab={props.tab}></ResourcesTab>
     49        </Row>
     50      </Container>}
     51    </>
     52  );
    5453};
    5554
Note: See TracChangeset for help on using the changeset viewer.