Changeset 07f4e8b for frontend/src/Pages
- Timestamp:
- 01/24/24 17:42:28 (10 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- Location:
- frontend/src/Pages
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Pages/HotelDetailsPage.js
r5528b99 r07f4e8b 1 1 import React from "react"; 2 2 import LoginForm from "../Components/Login/LoginForm"; 3 <<<<<<< HEAD4 3 import {Container, Row, Col, Form, FloatingLabel, Modal, Button} from "react-bootstrap"; 5 =======6 import { Container, Row, Col, Form } from "react-bootstrap";7 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)8 4 import Navigation from "../Components/Layout/Navbar/Navigation"; 9 5 import Carousel from "react-bootstrap/Carousel"; … … 73 69 placeholder="Каде ќе патувате?:" 74 70 id="location" 71 value={data.hotelLocation} 75 72 ></Form.Control> 76 <label htmlFor="location">Локација:</label>73 <label style={{left: "10px"}} htmlFor="location">Локација:</label> 77 74 </Form.Floating> 78 75 </Row> … … 84 81 placeholder="Датум на пристигнување:" 85 82 id="dateFrom" 83 value={from} 86 84 ></Form.Control> 87 <label htmlFor="dateFrom">Датум на пристигнување:</label>85 <label style={{left: "10px"}} htmlFor="dateFrom">Датум на пристигнување:</label> 88 86 </Form.Floating> 89 87 </Row> … … 95 93 placeholder="Датум на заминување:" 96 94 id="dateTo" 95 value={to} 97 96 ></Form.Control> 98 <label htmlFor="dateTo">Датум на заминување:</label>97 <label style={{left: "10px"}} htmlFor="dateTo">Датум на заминување:</label> 99 98 </Form.Floating> 100 99 </Row> … … 107 106 id="floatingPassengers" 108 107 ></Form.Control> 109 <label htmlFor="floatingPassengers">Број на гости:</label>108 <label style={{left: "10px"}} htmlFor="floatingPassengers">Број на гости:</label> 110 109 </Form.Floating> 111 110 </Row> … … 117 116 {data.images.map((image) => { 118 117 let link = image.url; 119 console.log("SLIKATAAA")120 console.log(image)121 118 if (image.url.includes('Desktop')) { 122 119 link = 'http://localhost:8080/download?fileName=' + encodeURIComponent(image.url); -
frontend/src/Pages/HotelEditPage.js
r5528b99 r07f4e8b 1 import React, { useState} from "react";2 import { Container, Col, Row, Image} from "react-bootstrap";1 import React, {useState} from "react"; 2 import {Container, Col, Row, Image} from "react-bootstrap"; 3 3 import Navigation from "../Components/Layout/Navbar/Navigation"; 4 4 import ResourcesTab from "../Components/Resources/ResourcesTab"; 5 5 import HotelEditTab from "../Components/HotelEdit/HotelEditTab"; 6 6 import useGet from "../Components/Hooks/useGet"; 7 import { useParams } from "react-router-dom"; 7 import {Navigate, useParams} from "react-router-dom"; 8 import {useAuth} from "../Components/Context/AuthContext"; 8 9 9 10 10 11 const HotelEditPage = () => { 11 12 12 const params = useParams();13 const link = "/hotel/list/" + params.hotelId;14 const [changed, setChanged] = useState(0)15 const { data, setData, isLoading, getData} = useGet(link, changed);13 const params = useParams(); 14 const link = `/hotel/${params.hotelId}/list`; 15 const [changed, setChanged] = useState(0) 16 const {data, setData, isLoading, getData} = useGet(link, changed); 16 17 17 18 18 console.log(data)19 return (20 <>21 <Navigation/>22 {!isLoading && <Container>23 <Row className="mb-5">24 <h2 style={{ color: "#159895", textAlign: "left"}}>Мои ресурси</h2>25 </Row>26 <Row className="mb-5">27 <Col>28 <Row className="d-flex mb-3">29 <Col30 className="d-flex justify-content-center"31 style={{ maxWidth: "30%"}}32 >33 <Image34 src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"35 style={{36 height: "5em",37 borderRadius: "50%",38 maxWidth: "100%",39 }}40 className="m-auto"41 ></Image>42 </Col>43 <Col className="d-flex justify-content-center">44 <Container className="pt-2" style={{ textAlign: "left"}}>45 <h4>{data.hotelName}</h4>46 <h5>{data.hotelLocation}</h5>47 </Container>48 </Col>49 </Row>50 </Col>51 </Row>52 <Row>53 <HotelEditTab refresh={setChanged} displayRoom={data}/>54 </Row>55 </Container>}56 </>57 );19 console.log(data) 20 return ( 21 <> 22 <Navigation/> 23 {!isLoading && <Container> 24 <Row className="mb-5"> 25 <h2 style={{color: "#159895", textAlign: "left"}}>Мои ресурси</h2> 26 </Row> 27 <Row className="mb-5"> 28 <Col> 29 <Row className="d-flex mb-3"> 30 <Col 31 className="d-flex justify-content-center" 32 style={{maxWidth: "30%"}} 33 > 34 <Image 35 src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg" 36 style={{ 37 height: "5em", 38 borderRadius: "50%", 39 maxWidth: "100%", 40 }} 41 className="m-auto" 42 ></Image> 43 </Col> 44 <Col className="d-flex justify-content-center"> 45 <Container className="pt-2" style={{textAlign: "left"}}> 46 <h4>{data.hotelName}</h4> 47 <h5>{data.hotelLocation}</h5> 48 </Container> 49 </Col> 50 </Row> 51 </Col> 52 </Row> 53 <Row> 54 <HotelEditTab refresh={setChanged} displayRoom={data}/> 55 </Row> 56 </Container>} 57 </> 58 ); 58 59 }; 59 60 -
frontend/src/Pages/LoginErrorPage.js
r5528b99 r07f4e8b 11 11 const [show, setShow] = useState(false); 12 12 const [changed, setChanged] = useState(0); 13 const {data, isLoading} = useGet("/username")14 13 const userId = localStorage.getItem("userId") 15 14 const [registered, setRegistered] = useState(false); -
frontend/src/Pages/LoginPage.js
r5528b99 r07f4e8b 3 3 import { Container } from "react-bootstrap"; 4 4 import Navigation from "../Components/Layout/Navbar/Navigation"; 5 import {useAuth} from "../Components/Context/AuthContext"; 6 import {Navigate} from "react-router-dom"; 7 5 8 6 9 const LoginPage = () => { … … 8 11 document.body.style.marginTop = "auto"; 9 12 document.body.style.marginBottom = "auto"; 13 14 const Auth = useAuth(); 15 const isLoggedIn = Auth.userIsAuthenticated(); 16 17 if (isLoggedIn) { 18 return <Navigate to={'/home'}/> 19 } 20 10 21 return ( 11 22 <> -
frontend/src/Pages/NoBusinessRegisteredError.js
r5528b99 r07f4e8b 6 6 import RegisterBusinessForm from "../Components/Forms/RegisterBusinessForm"; 7 7 import useGet from "../Components/Hooks/useGet"; 8 import { useNavigate } from "react-router-dom"; 8 import {Navigate, useNavigate} from "react-router-dom"; 9 import {useAuth} from "../Components/Context/AuthContext"; 9 10 10 11 const NoBusinessRegisteredError = (props) => { 11 12 const [show, setShow] = useState(false); 12 13 const [changed, setChanged] = useState(0); 13 const {data, isLoading} = useGet("/username") 14 const Auth = useAuth(); 15 const isLoggedIn = Auth.userIsAuthenticated(); 14 16 const userId = localStorage.getItem("userId") 15 17 const [registered, setRegistered] = useState(false); … … 45 47 46 48 47 console.log(data) 49 if(!isLoggedIn) 50 { 51 return <Navigate to={'/login'}/> 52 } 48 53 49 !isLoading && !data && navigator("/login")50 54 !firmaIsLoading && firma && firma.length > 0 && firma[0].approved && navigator("/resources/hotel") 51 55 -
frontend/src/Pages/ProfilePage.js
r5528b99 r07f4e8b 8 8 import ChangePasswordForm from "../Components/Forms/ChangePasswordForm"; 9 9 import useGet from "../Components/Hooks/useGet"; 10 import {useAuth} from "../Components/Context/AuthContext"; 11 import {Navigate} from "react-router-dom"; 10 12 11 13 const ProfilePage = () => { 12 14 13 const { data, setData, isLoading, getData } = useGet("/principal");15 const { data, setData, isLoading, getData } = useGet("/principal"); 14 16 15 17 18 16 19 const profileData = { 17 20 "name": "Марко", … … 19 22 "address": "ул. Раскрсница бр. 10", 20 23 "dateOfBirth": "2002-01-01", 21 "country": " Никогаш Северна само МАКЕДОНИЈА",24 "country": "Македонија", 22 25 "zip": "1000", 23 26 "city": "Скопје", … … 27 30 28 31 32 29 33 return ( 30 34 <> 31 35 <Navigation /> 32 {!isLoading && <Container>36 {!isLoading && <Container> 33 37 <Row className="mb-5"> 34 38 <h2 style={{ color: "#159895", textAlign: "left" }}>Мојот профил</h2> -
frontend/src/Pages/ResourcesPage.js
r5528b99 r07f4e8b 1 1 import React from "react"; 2 import { Container, Col, Row, Image} from "react-bootstrap";2 import {Container, Col, Row, Image} from "react-bootstrap"; 3 3 import Navigation from "../Components/Layout/Navbar/Navigation"; 4 4 import ResourcesTab from "../Components/Resources/ResourcesTab"; 5 import { useState} from "react";5 import {useState} from "react"; 6 6 import useGet from "../Components/Hooks/useGet"; 7 import {useAuth} from "../Components/Context/AuthContext"; 8 import {Navigate} from "react-router-dom"; 7 9 8 10 const ResourcesPage = (props) => { 9 11 10 console.log(props.tab)11 const { data, setData, isLoading, getData } = useGet("/principal");12 const Auth = useAuth(); 13 const user = Auth.getUser(); 12 14 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 ); 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 ); 53 54 }; 54 55 -
frontend/src/Pages/RestaurantDetailsPage.js
r5528b99 r07f4e8b 133 133 <Row> 134 134 <Carousel activeIndex={index} onSelect={handleSelect}> 135 <Carousel.Item> 135 {data.images.map((image) => { 136 let link = image.url; 137 if (image.url.includes('Desktop')) { 138 link = 'http://localhost:8080/download?fileName=' + encodeURIComponent(image.url); 139 } 140 return ( 141 <Carousel.Item> 142 <img 143 className="d-block w-100 h-400 rounded-5" 144 src={link} 145 alt="First slide" 146 style={{ height: "50vh" }} 147 /> 148 </Carousel.Item> 149 ) 150 })} 151 {data.images.length == 0 && <Carousel.Item> 136 152 <img 137 153 className="d-block w-100 h-400 rounded-5" … … 140 156 style={{height: "50vh"}} 141 157 /> 142 </Carousel.Item> 143 <Carousel.Item> 144 <img 145 className="d-block w-100 rounded-5" 146 src="https://emagazin.mk/wp-content/uploads/2022/03/Karos_Photography-7871.jpg" 147 alt="Second slide" 148 style={{height: "50vh"}} 149 /> 150 </Carousel.Item> 151 <Carousel.Item> 152 <img 153 className="d-block w-100 rounded-5" 154 src="https://lh5.googleusercontent.com/p/AF1QipMQAwahuuJCJ2rDUYNrhnwiX1070adTsM6LmzV5=w480-h300-k-n" 155 alt="Third slide" 156 style={{height: "50vh"}} 157 /> 158 </Carousel.Item> 158 </Carousel.Item>} 159 159 </Carousel> 160 160 </Row> … … 169 169 <Col className="col-md-4"><ReviewsCarousel reviews={data.reviews}></ReviewsCarousel></Col> 170 170 </Row> 171 <Row className="mb-3"><MenuCarousel menu={data.menus}></MenuCarousel></Row>171 <Row className="mb-3"><MenuCarousel images={data.menuImages} menu={data.menus}></MenuCarousel></Row> 172 172 <Row><TablesTable params={formData} data={data.tables}></TablesTable></Row> 173 173 <Row><ContactBar></ContactBar></Row> -
frontend/src/Pages/RestaurantEditPage.js
r5528b99 r07f4e8b 6 6 import RestaurantEditTab from "../Components/RestaurantEdit/RestaurantEditTab"; 7 7 import useGet from "../Components/Hooks/useGet"; 8 import { useParams, useSearchParams } from "react-router-dom"; 8 import {Navigate, useParams, useSearchParams} from "react-router-dom"; 9 import {useAuth} from "../Components/Context/AuthContext"; 9 10 10 11 const RestaurantEditPage = () => { -
frontend/src/Pages/SearchPage.js
r5528b99 r07f4e8b 1 import React from "react";1 import React, {useState} from "react"; 2 2 import Navigation from '../Components/Layout/Navbar/Navigation'; 3 3 import 'bootstrap/dist/css/bootstrap.css'; 4 4 import 'bootstrap/dist/js/bootstrap.js'; 5 5 import HomeCarousel from '../Components/Layout/CarouselHome/Carousel'; 6 import { Card, Container, Nav, Row, Col} from 'react-bootstrap';6 import {Card, Container, Nav, Row, Col} from 'react-bootstrap'; 7 7 import TabComponent from '../Components/Tab/Tab'; 8 8 import Offers from '../Components/Layout/Offers/Offers'; … … 11 11 import BecomeAHost from "../Components/BecomeAHost/BecomeAHost" 12 12 import HotelLisitng from "../Components/Listings/HotelListing" 13 import SearchCriterias from "../Components/SearchCriterias/SearchCriteriasBar";13 import SearchCriteriasHotel from "../Components/SearchCriterias/SearchCriteriasHotel"; 14 14 import SortButton from "../Components/Listings/SortButton"; 15 15 import FilterButton from "../Components/Listings/FilterButton"; 16 16 import TransportListing from "../Components/Listings/TransportListing"; 17 17 import useGet from "../Components/Hooks/useGet"; 18 import { useParams } from "react-router-dom"; 19 <<<<<<< HEAD 18 import {useParams} from "react-router-dom"; 20 19 import SearchCriteriasBar from "../Components/SearchCriterias/SearchCriteriasBar"; 21 20 import RestaurantDetailsPage from "./RestaurantDetailsPage"; 22 21 import RestaurantListing from "../Components/Listings/RestaurantListing"; 23 =======24 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)25 22 26 23 … … 29 26 const params = useParams(); 30 27 console.log(params) 31 28 const [sortingArg, setSortingArg] = useState("") 32 29 33 30 document.body.style.backgroundColor = "white" … … 41 38 42 39 } 43 44 <<<<<<< HEAD 45 let link = props.type === "transport" ? `/transport/search?from=${params.from}&to=${params.to}&date=${params.date}&numPassengers=${params.numPassengers}` : props.type === "hotel" ? `/hotel/search?hotelLocation=${params.hotelLocation}&dateFrom=${params.dateFrom}&dateTo=${params.dateTo}&numBeds=${params.numBeds}` : `/restaurant/search?restaurantLocation=${params.restaurantLocation}&date=${params.date}&hourFrom=${params.hourFrom}&hourTo=${params.hourTo}&numPeople=${params.numPeople}` 46 ======= 47 let link = props.type === "transport" ? `/transport/search?from=${params.from}&to=${params.to}&date=${params.date}` : props.type === "hotel" ? `/hotel/search?hotelLocation=${params.hotelLocation}&dateFrom=${params.dateFrom}&dateTo=${params.dateTo}&numBeds=${params.numBeds}` : "" 48 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl) 40 41 const getSortingFn = (type, arg) => { 42 if (type === 'hotel') { 43 if (arg === "priceAsc") 44 { 45 return (a, b) => { 46 return a.totalPrice - b.totalPrice; 47 } 48 } 49 else if (arg === "priceDesc") 50 { 51 return (a, b) => { 52 return -(a.totalPrice - b.totalPrice); 53 } 54 } 55 else if (arg === 'nameAsc') 56 { 57 return (a, b) => { 58 return a.hotelName.localeCompare(b.hotelName); 59 } 60 } 61 else if(arg === 'nameDesc') 62 { 63 return (a, b) => { 64 return -a.hotelName.localeCompare(b.hotelName); 65 } 66 } 67 } 68 else if (type === 'transport') 69 { 70 if (arg === "priceAsc") 71 { 72 return (a, b) => { 73 return a.price - b.price; 74 } 75 } 76 else if (arg === "priceDesc") 77 { 78 return (a, b) => { 79 return -(a.price - b.price); 80 } 81 } 82 } 83 else if (type === 'restaurant') 84 { 85 if (arg === 'nameAsc') 86 { 87 return (a, b) => { 88 return a.restaurantName.localeCompare(b.restaurantName); 89 } 90 } 91 else if(arg === 'nameDesc') 92 { 93 return (a, b) => { 94 return -a.restaurantName.localeCompare(b.restaurantName); 95 } 96 } 97 } 98 } 99 100 let link = props.type === "transport" ? `/transport/search?from=${params.from}&to=${params.to}&date=${params.date}&numPassengers=${params.numPassengers}` : props.type === "hotel" ? `/hotel/search?hotelLocation=${params.hotelLocation}&dateFrom=${params.dateFrom}&dateTo=${params.dateTo}&numBeds=${params.numBeds}&flexible=${params.flexible}` : `/restaurant/search?restaurantLocation=${params.restaurantLocation}&date=${params.date}&hourFrom=${params.hourFrom}&hourTo=${params.hourTo}&numPeople=${params.numPeople}` 49 101 console.log(link) 50 102 console.log(params.date) 51 const { data, isLoading, getData, setData} = useGet(link);103 const {data, isLoading, getData, setData} = useGet(link); 52 104 !isLoading && console.log(data) 53 105 return ( 54 106 <> 55 107 <Navigation></Navigation> 56 <SearchCriterias criterias={useParams()}></SearchCriterias>108 <SearchCriteriasBar type={props.type} criterias={useParams()}></SearchCriteriasBar> 57 109 <Container className="d-flex justify-content-end gx-5" style={{maxWidth: "60%"}}> 58 110 <Row> … … 61 113 </Col> 62 114 <Col> 63 <SortButton ></SortButton>115 <SortButton setSortingArg={setSortingArg} type={props.type}></SortButton> 64 116 </Col> 65 117 </Row> 66 118 </Container> 67 119 {props.type === "hotel" && !isLoading && data && <Container fluid> 68 {data. map(hotel => {120 {data.sort(getSortingFn(props.type, sortingArg)).map(hotel => { 69 121 return <HotelLisitng from={params.dateFrom} to={params.dateTo} data={hotel}/> 70 122 })} 71 123 </Container>} 72 124 {props.type === "transport" && !isLoading && data && <Container fluid> 73 {data. map(transport => {125 {data.sort(getSortingFn(props.type, sortingArg)).map(transport => { 74 126 return <TransportListing params={params} data={transport}/> 75 127 })} 76 128 </Container>} 77 129 {props.type === "restaurant" && !isLoading && data && <Container fluid> 78 {data. map(restaurant => {130 {data.sort(getSortingFn(props.type, sortingArg)).map(restaurant => { 79 131 return <RestaurantListing params={params} data={restaurant}/> 80 132 })} -
frontend/src/Pages/TransportEditPage.js
r5528b99 r07f4e8b 1 import React, { useState} from "react";2 import { Container, Col, Row, Image} from "react-bootstrap";1 import React, {useState} from "react"; 2 import {Container, Col, Row, Image} from "react-bootstrap"; 3 3 import Navigation from "../Components/Layout/Navbar/Navigation"; 4 4 import ResourcesTab from "../Components/Resources/ResourcesTab"; … … 7 7 import TransportEditTab from "../Components/TransportEdit/TransportEditTab"; 8 8 import useGet from "../Components/Hooks/useGet"; 9 import { useParams } from "react-router-dom"; 9 import {Navigate, useParams} from "react-router-dom"; 10 import {useAuth} from "../Components/Context/AuthContext"; 10 11 11 12 const TransportEditPage = () => { 12 const params = useParams();13 console.log("transportot ima id " + params.transportId);14 const link = "/transport/" + params.transportId;15 const [changed, setChanged] = useState(0);16 const { data, setData, isLoading, getData } = useGet(link, changed);17 13 18 !isLoading && console.log(data)14 const params = useParams(); 19 15 20 return ( 21 <> 22 <Navigation /> 23 {!isLoading && ( 24 <Container> 25 <Row className="mb-5"> 26 <h2 style={{ color: "#159895", textAlign: "left" }}>Мои ресурси</h2> 27 </Row> 28 <Row className="mb-5"> 29 <Col> 30 <Row className="d-flex mb-3"> 31 <Col 32 className="d-flex justify-content-center" 33 style={{ maxWidth: "30%" }} 34 > 35 <Image 36 src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg" 37 style={{ 38 height: "5em", 39 borderRadius: "50%", 40 maxWidth: "100%", 41 }} 42 className="m-auto" 43 ></Image> 44 </Col> 45 <Col className="d-flex justify-content-center"> 46 <Container className="pt-2" style={{ textAlign: "left" }}> 47 <h4>{data.transportName}</h4> 48 <h5>{data.carBrand + " " + data.carType}</h5> 49 </Container> 50 </Col> 51 </Row> 52 </Col> 53 </Row> 54 <Row> 55 {data && <TransportEditTab displayRoute={data} refresh={setChanged}/>} 56 </Row> 57 </Container> 58 )} 59 </> 60 ); 16 const link = "/transport/" + params.transportId; 17 18 const {data, setData, isLoading, getData, setChanged} = useGet(link); 19 20 !isLoading && console.log(data) 21 22 return ( 23 <> 24 <Navigation/> 25 {!isLoading && ( 26 <Container> 27 <Row className="mb-5"> 28 <h2 style={{color: "#159895", textAlign: "left"}}>Мои ресурси</h2> 29 </Row> 30 <Row className="mb-5"> 31 <Col> 32 <Row className="d-flex mb-3"> 33 <Col 34 className="d-flex justify-content-center" 35 style={{maxWidth: "30%"}} 36 > 37 <Image 38 src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg" 39 style={{ 40 height: "5em", 41 borderRadius: "50%", 42 maxWidth: "100%", 43 }} 44 className="m-auto" 45 ></Image> 46 </Col> 47 <Col className="d-flex justify-content-center"> 48 <Container className="pt-2" style={{textAlign: "left"}}> 49 <h4>{data.transportName}</h4> 50 <h5>{data.carBrand + " " + data.carType}</h5> 51 </Container> 52 </Col> 53 </Row> 54 </Col> 55 </Row> 56 <Row> 57 {data && <TransportEditTab displayRoute={data} refresh={setChanged}/>} 58 </Row> 59 </Container> 60 )} 61 </> 62 ); 61 63 }; 62 64
Note:
See TracChangeset
for help on using the changeset viewer.