diff --git a/src/component/PersonalityOrder/PersonalityOrder.jsx b/src/component/PersonalityOrder/PersonalityOrder.jsx index ad2ce52..64784b1 100644 --- a/src/component/PersonalityOrder/PersonalityOrder.jsx +++ b/src/component/PersonalityOrder/PersonalityOrder.jsx @@ -21,7 +21,7 @@ const PersonalityOrder = (props) => { } return ( -
+

{props?.title}

diff --git a/src/component/listPosts/PostBerth/PostBerth.jsx b/src/component/listPosts/PostBerth/PostBerth.jsx new file mode 100644 index 0000000..ad2e038 --- /dev/null +++ b/src/component/listPosts/PostBerth/PostBerth.jsx @@ -0,0 +1,43 @@ +import React from 'react'; +import style from "./PostBerth.module.css"; +import {NavLink} from "react-router-dom"; + +const PostBerth = (props) => { + return ( +
+
+

{props?.name}

+
+ {props?.urlClassMoreInfo.constructor === Array ? + props?.ship.map((obj,index) => { + return( +
+ {obj.typeShip==="Яхта" + ? +
+ {obj?.name} + Яхта + от {obj?.price} ₽/час +
+
+ : +
+ {obj?.name} + Катер + от {obj?.price} ₽/час +
+
+ } +
+ ) + }) + : null} + + +
+
+
+ ); +}; + +export default PostBerth; \ No newline at end of file diff --git a/src/component/listPosts/PostBerth/PostBerth.module.css b/src/component/listPosts/PostBerth/PostBerth.module.css new file mode 100644 index 0000000..b8756ca --- /dev/null +++ b/src/component/listPosts/PostBerth/PostBerth.module.css @@ -0,0 +1,12 @@ +.name_ship{ + color: black; +} + +.name_ship:hover{ + color: #007bff; +} + +.type_ship{ + padding-left: 12px; + font-size: 12px; +} \ No newline at end of file diff --git a/src/page/Berths.jsx b/src/page/Berths.jsx index 93bc95b..c8962cc 100644 --- a/src/page/Berths.jsx +++ b/src/page/Berths.jsx @@ -1,9 +1,41 @@ -import React from 'react'; - +import React,{useState} from 'react'; +import ListPosts from "../component/listPosts/ListPosts"; +import PostBerth from "../component/listPosts/PostBerth/PostBerth"; +import PersonalityOrder from "../component/PersonalityOrder/PersonalityOrder"; const Berths = () => { + + const sendProposal = (message) =>{ + //{name:"",phone:"",date:"",time:"",text:""} + console.log(message); + } + + const [berthsPost,setBerthsPost] = useState([ + {id:"1",name:"имя причала",ship:[ + {id:"1",name:"имя",typeShip:"Катер",price:"500"}, + {id:"2",name:"имя",typeShip:"Яхта",price:"1000"}, + {id:"3",name:"имя",typeShip:"Катер",price:"2000"}, + ]}, + {id:"2",name:"имя причала",ship:[ + {id:"4",name:"имя",typeShip:"Катер",price:"500"}, + {id:"5",name:"имя",typeShip:"Яхта",price:"1000"}, + {id:"6",name:"имя",typeShip:"Катер",price:"2000"}, + ]}, + {id:"3",name:"имя причала",ship:[ + {id:"7",name:"имя",typeShip:"Катер",price:"500"}, + {id:"8",name:"имя",typeShip:"Яхта",price:"1000"}, + ]}, + {id:"4",name:"имя причала",ship:[ + {id:"9",name:"имя",typeShip:"Катер",price:"500"}, + ]}, + ]); + return (
-

Наши причалы

+ + +
); }; diff --git a/src/page/Boats.jsx b/src/page/Boats.jsx index ef3df7e..f86f04a 100644 --- a/src/page/Boats.jsx +++ b/src/page/Boats.jsx @@ -22,6 +22,7 @@ const Boats = () => {
+
); };