wip
This commit is contained in:
23
src/components/rooms/roomBox.jsx
Normal file
23
src/components/rooms/roomBox.jsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import '../../assets/styles/itembox.css'
|
||||
import { } from '../item/ItemBox'
|
||||
|
||||
|
||||
// Composant Détails du Produit
|
||||
export const RoomBox = ({ name, itemCount, roomPrice, _id }) => {
|
||||
const [roomData, setRoomData] = useState();
|
||||
|
||||
useEffect(() => {
|
||||
setRoomData({name, itemCount, roomPrice, _id})
|
||||
}, [name, itemCount, roomPrice, _id]);
|
||||
|
||||
|
||||
return (
|
||||
<div className="product-details" >
|
||||
<Description title={roomData.name} >
|
||||
<Characteristic label="Nombre d'articles" value={roomData.itemCount} />
|
||||
<Characteristic label="Prix total" value={roomData.roomPrice} />
|
||||
</Description>
|
||||
</div>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user