Skip to content

Commit 7002851

Browse files
committed
get rooms data from containers
1 parent f6719af commit 7002851

File tree

1 file changed

+2
-92
lines changed

1 file changed

+2
-92
lines changed

src/component/Body/Body.js

Lines changed: 2 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -6,104 +6,14 @@ import OfferContents from "./OfferContents/offerContents";
66
import Rooms from "./Rooms/Rooms";
77
import Contact from "./Contact/Contact";
88

9-
function getRooms() {
10-
var json = {
11-
rooms: [
12-
{
13-
id: 1,
14-
name: "Astro Hotel",
15-
price: "200",
16-
description: "Lorem Ipsum is simply dummy text of the printing.",
17-
imgSource: require("assets/images/room_1.jpg"),
18-
imgAlt: "astro-hotel",
19-
},
20-
{
21-
id: 2,
22-
name: "Buoi Xuan Huan",
23-
price: "50",
24-
description: "Lorem Ipsum is simply dummy text of the printing.",
25-
imgSource: require("assets/images/room_2.jpg"),
26-
imgAlt: "astro-hotel",
27-
},
28-
{
29-
id: 3,
30-
name: "Muong Thanh Hotel",
31-
price: "100",
32-
description: "Lorem Ipsum is simply dummy text of the printing.",
33-
imgSource: require("assets/images/room_3.jpg"),
34-
imgAlt: "astro-hotel",
35-
},
36-
{
37-
id: 4,
38-
name: "Noor Hotel",
39-
price: "20",
40-
description: "Lorem Ipsum is simply dummy text of the printing.",
41-
imgSource: require("assets/images/room_4.jpg"),
42-
imgAlt: "astro-hotel",
43-
},
44-
{
45-
id: 5,
46-
name: "Noor Hotel",
47-
price: "290",
48-
description: "Lorem Ipsum is simply dummy text of the printing.",
49-
imgSource: require("assets/images/room_5.jpg"),
50-
imgAlt: "astro-hotel",
51-
},
52-
{
53-
id: 6,
54-
name: "Noor Hotel",
55-
price: "260",
56-
description: "Lorem Ipsum is simply dummy text of the printing.",
57-
imgSource: require("assets/images/room_6.jpg"),
58-
imgAlt: "astro-hotel",
59-
},
60-
{
61-
id: 7,
62-
name: "Noor Hotel",
63-
price: "50",
64-
description: "Lorem Ipsum is simply dummy text of the printing.",
65-
imgSource: require("assets/images/room_7.jpg"),
66-
imgAlt: "astro-hotel",
67-
},
68-
{
69-
id: 8,
70-
name: "Noor Hotel",
71-
price: "40",
72-
description: "Lorem Ipsum is simply dummy text of the printing.",
73-
imgSource: require("assets/images/room_8.jpg"),
74-
imgAlt: "astro-hotel",
75-
},
76-
{
77-
id: 9,
78-
name: "Noor Hotel",
79-
price: "30",
80-
description: "Lorem Ipsum is simply dummy text of the printing.",
81-
imgSource: require("assets/images/room_9.jpg"),
82-
imgAlt: "astro-hotel",
83-
},
84-
{
85-
id: 10,
86-
name: "Noor Hotel",
87-
price: "24",
88-
description: "Lorem Ipsum is simply dummy text of the printing.",
89-
imgSource: require("assets/images/room_10.jpg"),
90-
imgAlt: "astro-hotel",
91-
},
92-
],
93-
};
94-
return json;
95-
}
96-
97-
const Body = ({ hotels, offers }) => {
98-
const listRooms = getRooms();
99-
9+
const Body = ({ hotels, offers, rooms }) => {
10010
return (
10111
<React.Fragment>
10212
<Hero />
10313
<Booking />
10414
<Hotels listHotels={hotels} />
10515
<OfferContents listOffers={offers} />
106-
<Rooms listRooms={listRooms} />
16+
<Rooms listRooms={rooms} />
10717
<Contact />
10818
</React.Fragment>
10919
);

0 commit comments

Comments
 (0)