From c481ecfbdd837e1a2ca79338dfaed525317baa8a Mon Sep 17 00:00:00 2001 From: FortuneGame Date: Wed, 10 Jan 2024 19:03:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB:=20-?= =?UTF-8?q?=20=D0=A1=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D1=83=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B?= =?UTF-8?q?=D0=B9=20=D0=BF=D1=80=D0=B8=D1=87=D0=B0=D0=BB=20-=20=D0=A0?= =?UTF-8?q?=D0=B0=D1=81=D1=81=D0=BA=D0=B8=D0=BD=D1=83=D0=BB=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B5=D0=BA=D1=81=D1=82=20url=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=81=D1=8C=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=20=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB:=20-=20=D0=9F?= =?UTF-8?q?=D0=BE=D0=B4=D1=80=D0=B5=D0=B4=D0=B0=D1=87=D0=B8=D0=BB=20url=20?= =?UTF-8?q?=D0=B2=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=D1=85=20-=20=D0=9D?= =?UTF-8?q?=D0=B0=20=D0=BB=D0=BE=D0=BA=D0=B0=D0=BB=D1=8C=D0=BD=D1=8B=D1=85?= =?UTF-8?q?=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0=D1=85=20?= =?UTF-8?q?=D1=8F=D1=85=D1=82=20=D0=B8=20=D0=BA=D0=B0=D1=82=D0=B5=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D1=81?= =?UTF-8?q?=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20=D0=BD=D0=B0=20=D0=B8=D0=BD?= =?UTF-8?q?=D1=84=D1=83=20=D0=BF=D1=80=D0=BE=20=D0=BF=D1=80=D0=B8=D1=87?= =?UTF-8?q?=D0=B0=D0=BB=20=D0=B3=D0=B4=D0=B5=20=D0=BF=D1=80=D0=B8=D0=BF?= =?UTF-8?q?=D0=B0=D1=80=D0=BA=D0=BE=D0=B2=D0=B0=D0=BD=D1=8B=20=D0=BE=D0=BD?= =?UTF-8?q?=D0=B8=20-=20=D0=94=D0=BB=D1=8F=20PopularList.jsx=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20urlClassMoreInfo=20?= =?UTF-8?q?=D1=81=D1=87=D0=B8=D1=82=D1=8B=D0=B2=D0=B0=D1=8F=20=D0=9A=D0=BE?= =?UTF-8?q?=D0=BD=D1=82=D0=B5=D0=BA=D1=81=D1=82=20=3D>=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=20=D1=83=D0=BA=D0=B0=D0=B7=D0=B0=D0=BD=D0=B8=D0=B8=20?= =?UTF-8?q?=D1=8D=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=20=20=D0=BD=D0=B5=20=D1=83=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2?= =?UTF-8?q?=D0=B0=D0=B5=D0=BC=20=D1=8D=D1=82=D0=BE=D1=82=20=D0=BF=D1=80?= =?UTF-8?q?=D0=BE=D0=BF=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.css | 2 +- src/App.js | 53 ++++++--- src/component/Popular/PopularList.jsx | 14 ++- .../listPosts/PostBerth/PostBerth.jsx | 10 +- .../listPosts/PostBerth/PostBerth.module.css | 8 ++ .../listPosts/PostShip/PostShip.module.css | 8 ++ src/component/navbar/Navbar.jsx | 17 +-- src/context/index.js | 3 + src/page/About.jsx | 7 +- src/page/Berth.jsx | 104 ++++++++++++++++++ src/page/Berths.jsx | 5 +- src/page/Boat.jsx | 17 ++- src/page/Boats.jsx | 5 +- src/page/Buffet.jsx | 11 +- src/page/Event.jsx | 5 +- src/page/Events.jsx | 5 +- src/page/Main.jsx | 12 +- src/page/RouterSee.jsx | 5 +- src/page/Routers.jsx | 5 +- src/page/Yacht.jsx | 16 ++- src/page/Yachts.jsx | 5 +- 21 files changed, 240 insertions(+), 77 deletions(-) create mode 100644 src/context/index.js create mode 100644 src/page/Berth.jsx diff --git a/src/App.css b/src/App.css index 3776f0b..1ed0b93 100644 --- a/src/App.css +++ b/src/App.css @@ -16,4 +16,4 @@ a{ font-size: 12px; } -} +} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 5d97c34..7d26954 100644 --- a/src/App.js +++ b/src/App.js @@ -17,28 +17,45 @@ import Boat from "./page/Boat"; import Yacht from "./page/Yacht"; import Event from "./page/Event"; import RouterSee from "./page/RouterSee"; +import Berth from './page/Berth'; + +import {UrlClassMoreInfoContext} from "./context/index"; function App() { + + const url={ + boats:"/boats", + yachts:"/yachts", + routers:"/routers", + eventsSee:"/events", + berths:"/berths", + buffet:"/buffet", + about:"/about" + } + return (
- - - - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - }/> - -
- + + + + + }/> + }/> + }/> + }/> + }/> + }/> + }/> + }/> + }/> + }/> + }/> + }/> + }/> + +
+ +
); } diff --git a/src/component/Popular/PopularList.jsx b/src/component/Popular/PopularList.jsx index 2ce182b..4c7ba82 100644 --- a/src/component/Popular/PopularList.jsx +++ b/src/component/Popular/PopularList.jsx @@ -1,29 +1,31 @@ -import React from 'react'; +import React, {useContext} from 'react'; import PopularCard from "./PopularCard"; +import {UrlClassMoreInfoContext} from "../../context"; const PopularList = ({popularList,title}) => { + const url = useContext(UrlClassMoreInfoContext); return (
- {popularList && popularList?.urlClassMoreInfo ? + {popularList ?
{popularList?.boats ? popularList.boats.map((obj,index)=>{ - return (); + return (); }) :null} {popularList?.yachts ? popularList.yachts.map((obj,index)=>{ - return (); + return (); }) :null} {popularList?.routers ? popularList.routers.map((obj,index)=>{ - return (); + return (); }) :null} {popularList?.eventsSee ? popularList.eventsSee.map((obj,index)=>{ - return (); + return (); }) :null}
diff --git a/src/component/listPosts/PostBerth/PostBerth.jsx b/src/component/listPosts/PostBerth/PostBerth.jsx index 0edb7dc..a374b91 100644 --- a/src/component/listPosts/PostBerth/PostBerth.jsx +++ b/src/component/listPosts/PostBerth/PostBerth.jsx @@ -6,23 +6,25 @@ const PostBerth = (props) => { return (
-

{props?.name}

+ +

{props?.name}

+
- {props?.urlClassMoreInfo && props.urlClassMoreInfo.constructor === Array ? + {props?.urlClassMoreInfo ? props.ship.map((obj,index) => { return(
{obj.typeShip==="Яхта" ?
- {obj?.name} + {obj?.name} Яхта от {obj?.price} ₽/час
:
- {obj?.name} + {obj?.name} Катер от {obj?.price} ₽/час
diff --git a/src/component/listPosts/PostBerth/PostBerth.module.css b/src/component/listPosts/PostBerth/PostBerth.module.css index b8756ca..8619777 100644 --- a/src/component/listPosts/PostBerth/PostBerth.module.css +++ b/src/component/listPosts/PostBerth/PostBerth.module.css @@ -9,4 +9,12 @@ .type_ship{ padding-left: 12px; font-size: 12px; +} + +.name_berth{ + color: black; +} + +.name_berth:hover{ + color: #007bff; } \ No newline at end of file diff --git a/src/component/listPosts/PostShip/PostShip.module.css b/src/component/listPosts/PostShip/PostShip.module.css index a27897c..2fa5311 100644 --- a/src/component/listPosts/PostShip/PostShip.module.css +++ b/src/component/listPosts/PostShip/PostShip.module.css @@ -20,4 +20,12 @@ width: 100%; position: absolute; z-index: 1; +} + +.name_berth{ + color: black; +} + +.name_berth:hover{ + color: #007bff; } \ No newline at end of file diff --git a/src/component/navbar/Navbar.jsx b/src/component/navbar/Navbar.jsx index 3dffc7c..0ac292b 100644 --- a/src/component/navbar/Navbar.jsx +++ b/src/component/navbar/Navbar.jsx @@ -1,8 +1,9 @@ -import React from 'react'; +import React, {useContext} from 'react'; import {Navbar as NavbarB, Container, Nav} from "react-bootstrap"; import {FaPhoneAlt,FaWhatsapp,FaTelegram} from "react-icons/fa" import {NavLink} from "react-router-dom"; +import {UrlClassMoreInfoContext} from "../../context"; const Navbar = () => { return ( @@ -15,13 +16,13 @@ const Navbar = () => {
+7 (953) 349-61-09 diff --git a/src/context/index.js b/src/context/index.js new file mode 100644 index 0000000..8d3bbec --- /dev/null +++ b/src/context/index.js @@ -0,0 +1,3 @@ +import {createContext} from "react"; + +export const UrlClassMoreInfoContext = createContext(); \ No newline at end of file diff --git a/src/page/About.jsx b/src/page/About.jsx index 0dd4160..bc9973d 100644 --- a/src/page/About.jsx +++ b/src/page/About.jsx @@ -1,10 +1,11 @@ -import React,{useState} from 'react'; +import React,{useState,useContext} from 'react'; import {FaPhoneAlt,FaEnvelope} from "react-icons/fa"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; import ListPosts from "../component/listPosts/ListPosts"; import CarouselCard from "../component/carousel/CarouselCard"; import PostRoute from "../component/listPosts/PostRouter/PostRoute"; import Hr from "../component/hr/Hr"; +import {UrlClassMoreInfoContext} from "../context"; const About = () => { @@ -53,8 +54,8 @@ const About = () => {

- - + +
diff --git a/src/page/Berth.jsx b/src/page/Berth.jsx new file mode 100644 index 0000000..d5a84d4 --- /dev/null +++ b/src/page/Berth.jsx @@ -0,0 +1,104 @@ +import React, {useState,useContext} from 'react'; +import {NavLink, useParams} from "react-router-dom"; +import {UrlClassMoreInfoContext} from "../context"; +import ListPosts from "../component/listPosts/ListPosts"; +import PostShip from "../component/listPosts/PostShip/PostShip"; +import {FaArrowCircleRight} from "react-icons/fa"; +import Hr from "../component/hr/Hr"; +import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; + +const Berth = () => { + const params=useParams(); + console.log(params.id); + + const [berths,setBerths] = useState({ + id:'1', + name:'Имя причала', + text:"Причал Академика Павлова 11а находится в Санкт-Петербурге на Петроградской стороне и представляет собой удобное место для аренды катеров и яхт.", + map_src:'https://yandex.ru/map-widget/v1/?um=constructor%3A977f381de48c940e7de728b41d0e13006be886b476c3bdd9f146375250868623&source=constructor' + }); + + const [boatsPostOnHere,setBoatsPostOnHere] = useState([ + {id:"1",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:01",countPerson:"1",oldPrice:"1000",price:"500",isHit:"true",imgPath:"../img/page/boats.jpg"}, + {id:"2",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:15",countPerson:"2",oldPrice:"",price:"2000",isHit:"false",imgPath:"../img/page/boats.jpg"}, + {id:"3",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:22",countPerson:"3",oldPrice:"",price:"3000",isHit:"true",imgPath:"../img/page/boats.jpg"}, + {id:"4",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"20:15",countPerson:"4",oldPrice:"23",price:"4000",isHit:"false",imgPath:"../img/page/boats.jpg"}, + ]); + + const [yachtsPostOnHere,setYachtsPostOnHere] = useState([ + {id:"1",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:01",countPerson:"1",oldPrice:"1000",price:"500",isHit:"true",imgPath:"../img/page/yachts.jpg"}, + {id:"2",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:15",countPerson:"2",oldPrice:"",price:"2000",isHit:"false",imgPath:"../img/page/yachts.jpg"}, + {id:"3",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:22",countPerson:"3",oldPrice:"",price:"3000",isHit:"true",imgPath:"../img/page/yachts.jpg"}, + {id:"4",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"20:15",countPerson:"4",oldPrice:"23",price:"4000",isHit:"false",imgPath:"../img/page/yachts.jpg"}, + {id:"5",name:"имя",pier:"имя причала",onBoard:"на борту, на борту, на борту.",minTime:"00:01",countPerson:"1",oldPrice:"1000",price:"500",isHit:"true",imgPath:"../img/page/yachts.jpg"}, + ]); + + const sendProposal = (message) =>{ + //{name:"",phone:"",date:"",time:"",text:""} + console.log(message); + } + + return ( +
+
+
+
+ +
+
+
    +
  1. + Главная +
  2. +
  3. + Причалы +
  4. +
  5. + {berths.name} +
  6. +
+

{berths.name}

+

{berths.text}

+
+
+
+ +
+
+
+

Катера на этом причале

+
+ +
+ + Смотреть ещё + + +
+
+ +
+ +
+
+

Яхты на этом причале

+
+ +
+ + Смотреть ещё + + +
+
+ + +
+ +
+ ); +}; + +export default Berth; \ No newline at end of file diff --git a/src/page/Berths.jsx b/src/page/Berths.jsx index e52319c..fdfde9a 100644 --- a/src/page/Berths.jsx +++ b/src/page/Berths.jsx @@ -1,7 +1,8 @@ -import React,{useState} from 'react'; +import React, {useContext, useState} from 'react'; import ListPosts from "../component/listPosts/ListPosts"; import PostBerth from "../component/listPosts/PostBerth/PostBerth"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; +import {UrlClassMoreInfoContext} from "../context"; const Berths = () => { const sendProposal = (message) =>{ @@ -34,7 +35,7 @@ const Berths = () => { - +
); diff --git a/src/page/Boat.jsx b/src/page/Boat.jsx index 09811f8..3563172 100644 --- a/src/page/Boat.jsx +++ b/src/page/Boat.jsx @@ -1,12 +1,14 @@ -import React,{useState} from 'react'; +import React, {useContext, useState} from 'react'; import {NavLink, useParams} from "react-router-dom"; import Carousel from "../component/carousel/Carousel"; import style from "../component/listPosts/PostShip/PostShip.module.css"; import {FaArrowCircleRight, FaFire, FaTimes} from "react-icons/fa"; import Modal from "../component/modal/default/Modal"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; +import {UrlClassMoreInfoContext} from "../context"; const Boat = () => { + const params = useParams(); console.log(params.id); @@ -14,7 +16,10 @@ const Boat = () => { { id:"1", name:"имя", - pier:"имя причала", + pier:{ + id:"1", + name:"имя причала", + }, onBoard:"на борту, на борту, на борту.", minTime:"00:01", countPerson:"1", @@ -53,7 +58,7 @@ const Boat = () => { Главная
  • - Катера + Катера
  • {boat.name} @@ -114,9 +119,9 @@ const Boat = () => {
  • -

    - Причал{": "+boat.pier} -

    + + Причал{": "+boat.pier.name} +
    diff --git a/src/page/Boats.jsx b/src/page/Boats.jsx index abd44fd..bd71699 100644 --- a/src/page/Boats.jsx +++ b/src/page/Boats.jsx @@ -1,7 +1,8 @@ -import React, {useState} from 'react'; +import React, {useContext, useState} from 'react'; import MainImg from "../component/MainImage/MainImg"; import ListPosts from "../component/listPosts/ListPosts"; import PostShip from "../component/listPosts/PostShip/PostShip"; +import {UrlClassMoreInfoContext} from "../context"; const Boats = () => { @@ -21,7 +22,7 @@ const Boats = () => {
    - + ); diff --git a/src/page/Buffet.jsx b/src/page/Buffet.jsx index 98e0080..82f49cd 100644 --- a/src/page/Buffet.jsx +++ b/src/page/Buffet.jsx @@ -1,4 +1,4 @@ -import React,{useState} from 'react'; +import React,{useState,useContext} from 'react'; import Carousel from "../component/carousel/Carousel"; import {FaFilePdf} from "react-icons/fa"; import CarouselCard from "../component/carousel/CarouselCard"; @@ -6,6 +6,7 @@ import ListPosts from "../component/listPosts/ListPosts"; import PostShip from "../component/listPosts/PostShip/PostShip"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; import Hr from "../component/hr/Hr"; +import {UrlClassMoreInfoContext} from "../context"; const Buffet = () => { @@ -59,12 +60,12 @@ const Buffet = () => {

    - - + +
    - - + +
    diff --git a/src/page/Event.jsx b/src/page/Event.jsx index 59c0aba..4bacdf2 100644 --- a/src/page/Event.jsx +++ b/src/page/Event.jsx @@ -1,9 +1,10 @@ -import React,{useState} from 'react'; +import React,{useState,useContext} from 'react'; import {NavLink, useParams} from "react-router-dom"; import Carousel from "../component/carousel/Carousel"; import {FaFire} from "react-icons/fa"; import style from "../component/listPosts/PostRouter/PostRoute.module.css"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; +import {UrlClassMoreInfoContext} from "../context"; const Event = () => { const params = useParams(); @@ -45,7 +46,7 @@ const Event = () => { Главная
  • - Мероприятия + Мероприятия
  • {eventSee.name} diff --git a/src/page/Events.jsx b/src/page/Events.jsx index 7241ebf..a66e183 100644 --- a/src/page/Events.jsx +++ b/src/page/Events.jsx @@ -1,7 +1,8 @@ -import React,{useState} from 'react'; +import React,{useState,useContext} from 'react'; import MainImg from "../component/MainImage/MainImg"; import ListPosts from "../component/listPosts/ListPosts"; import PostEvent from "../component/listPosts/PostEvent/PostEvent"; +import {UrlClassMoreInfoContext} from "../context"; const Events = () => { @@ -22,7 +23,7 @@ const Events = () => { - + ); }; diff --git a/src/page/Main.jsx b/src/page/Main.jsx index 4c050c6..e2ebebc 100644 --- a/src/page/Main.jsx +++ b/src/page/Main.jsx @@ -1,4 +1,4 @@ -import React, {useState} from 'react'; +import React, {useContext, useState} from 'react'; import {NavLink} from "react-router-dom"; import {FaShip, FaMap, FaLaugh, FaLocationArrow, FaArrowCircleRight} from "react-icons/fa"; import MainImg from "../component/MainImage/MainImg"; @@ -8,6 +8,7 @@ import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; import ListPosts from "../component/listPosts/ListPosts"; import PostShip from "../component/listPosts/PostShip/PostShip"; import Hr from "../component/hr/Hr"; +import {UrlClassMoreInfoContext} from "../context"; const Main = () => { @@ -32,7 +33,6 @@ const Main = () => { yachts:[{id:"1",name:"имя",typeShip:"Яхта",imgPath:"./img/page/yachts.jpg"},{id:"2",name:"имя",typeShip:"Яхта",imgPath:"./img/page/yachts.jpg"}], routers:[ {id:"1",name:"имя",typeShip:"Катер",imgPath:"./img/page/routers.jpg"}, {id:"2",name:"имя",typeShip:"Яхта",imgPath:"./img/page/routers.jpg"}], eventsSee:[{id:"1",name:"имя",imgPath:"./img/page/events.jpg"},{id:"2",name:"имя",imgPath:"./img/page/events.jpg"}], - urlClassMoreInfo:{boats:"/boats",yachts:"/yachts",routers:"/routers",eventsSee:"/events"} }); const [sizeCarouselCardPopularList,setSizeCarouselCardPopularList] = useState(popularList?.boats?.length + popularList?.yachts?.length + popularList?.routers?.length + popularList?.eventsSee?.length) @@ -86,9 +86,9 @@ const Main = () => {

    Катера

    Большой выбор катеров для прогулки по Петербургу в неповторимой водной атмосфере.

    - +
    - + Смотреть ещё @@ -102,9 +102,9 @@ const Main = () => {

    Яхты

    Ждём гостей на борту наших яхт, чтобы добавить лету незабываемые впечатления.

    - +
    - + Смотреть ещё diff --git a/src/page/RouterSee.jsx b/src/page/RouterSee.jsx index 53e9a78..638d9d5 100644 --- a/src/page/RouterSee.jsx +++ b/src/page/RouterSee.jsx @@ -1,9 +1,10 @@ -import React,{useState} from 'react'; +import React,{useState,useContext} from 'react'; import {NavLink, useParams} from "react-router-dom"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; import Carousel from "../component/carousel/Carousel"; import {FaFire} from "react-icons/fa"; import style from "../component/listPosts/PostRouter/PostRoute.module.css"; +import {UrlClassMoreInfoContext} from "../context"; const RouterSee = () => { const params = useParams(); @@ -46,7 +47,7 @@ const RouterSee = () => { Главная
  • - Маршруты + Маршруты
  • {router.name} diff --git a/src/page/Routers.jsx b/src/page/Routers.jsx index 48f435e..d116eae 100644 --- a/src/page/Routers.jsx +++ b/src/page/Routers.jsx @@ -1,7 +1,8 @@ -import React, {useState} from 'react'; +import React, {useState,useContext} from 'react'; import MainImg from "../component/MainImage/MainImg"; import ListPosts from "../component/listPosts/ListPosts"; import PostRoute from "../component/listPosts/PostRouter/PostRoute"; +import {UrlClassMoreInfoContext} from "../context"; const Routers = () => { @@ -22,7 +23,7 @@ const Routers = () => { - + ); }; diff --git a/src/page/Yacht.jsx b/src/page/Yacht.jsx index 301cefe..3662de7 100644 --- a/src/page/Yacht.jsx +++ b/src/page/Yacht.jsx @@ -1,10 +1,11 @@ -import React,{useState} from 'react'; +import React,{useState,useContext} from 'react'; import {NavLink, useParams} from "react-router-dom"; import Carousel from "../component/carousel/Carousel"; import {FaArrowCircleRight, FaFire, FaTimes} from "react-icons/fa"; import style from "../component/listPosts/PostShip/PostShip.module.css"; import Modal from "../component/modal/default/Modal"; import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; +import {UrlClassMoreInfoContext} from "../context"; const Yacht = () => { const params = useParams(); @@ -14,7 +15,10 @@ const Yacht = () => { { id:"1", name:"имя", - pier:"имя причала", + pier:{ + id:"1", + name:"имя причала", + }, onBoard:"на борту, на борту, на борту.", minTime:"00:01", countPerson:"1", @@ -53,7 +57,7 @@ const Yacht = () => { Главная
  • - Яхты + Яхты
  • {yacht.name} @@ -114,9 +118,9 @@ const Yacht = () => { -

    - Причал{": "+yacht.pier} -

    + + Причал{": "+yacht.pier.name} + diff --git a/src/page/Yachts.jsx b/src/page/Yachts.jsx index 1ba734a..d4a9fd1 100644 --- a/src/page/Yachts.jsx +++ b/src/page/Yachts.jsx @@ -1,7 +1,8 @@ -import React, {useState} from 'react'; +import React, {useState,useContext} from 'react'; import MainImg from "../component/MainImage/MainImg"; import ListPosts from "../component/listPosts/ListPosts"; import PostShip from "../component/listPosts/PostShip/PostShip"; +import {UrlClassMoreInfoContext} from "../context"; const Yachts = () => { @@ -25,7 +26,7 @@ const Yachts = () => { - + ); };