Skip to content

Commit

Permalink
Merge pull request #10 from HrridoyV2/fetchData
Browse files Browse the repository at this point in the history
homepage data done
  • Loading branch information
HrridoyV2 authored Nov 16, 2020
2 parents eaf48ce + 7777521 commit 162585c
Show file tree
Hide file tree
Showing 28 changed files with 39 additions and 45 deletions.
16 changes: 16 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-brands-svg-icons": "^5.15.1",
"@fortawesome/free-regular-svg-icons": "^5.15.1",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.12",
"@material-ui/core": "^4.11.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/Home/HeaderMain/HeaderMain.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ background: #275A53;
border-radius: 5px;
} */
.searchsection {
background-image:linear-gradient(to right, rgba(0, 0, 0, 0.7),rgba(0, 0, 0, 0.7)), url("../../../../image/images/Rectangle 13.png");
background-image:linear-gradient(to right, rgba(0, 0, 0, 0.7),rgba(0, 0, 0, 0.7)), url("../../../../image/images/Luxury\ villa.png");
background-repeat: no-repeat;
background-position: center ;
background-size: cover;
Expand Down
45 changes: 10 additions & 35 deletions src/components/Home/Home/HouseRent/HouseRent.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,14 @@
import React from 'react';
import img1 from '../../../../image/images/Rectangle 394.png';
import img2 from '../../../../image/images/Rectangle 396.png';
import img3 from '../../../../image/images/Rectangle 398.png';
import img4 from '../../../../image/images/Rectangle 405.png';
import img5 from '../../../../image/images/Rectangle 403.png';
import img6 from '../../../../image/images/Rectangle 404.png';
import React, { useEffect, useState } from 'react';
import HouseRentDetails from '../HouseRentDetails/HouseRentDetails';

const HouseRent = () => {
const houseRentData = [
{
img: img1,
title: 'Washington Avenue'
},
{
img: img2,
title: 'Family Apartment Three'
},
{
img: img3,
title: 'Gorgeous house'
},
{
img: img4,
title: 'Luxury villa'
},
{
img: img5,
title: 'Epic Huda Palacio'
},
{
img: img6,
title: 'Washington Avenue'
},
]
const [rentsData, setRentsData] = useState([])

useEffect(() => {
fetch("http://localhost:5000/rentData")
.then((res) => res.json())
.then((data) => setRentsData(data));
}, [])
return (
<section>

Expand All @@ -43,12 +18,12 @@ const HouseRent = () => {
<h1 style={{ fontWeight: 'bold' }}>Discover the latest
rent
<br />
available today </h1>
available today</h1>
</div>
<div>
<div className="row">
{
houseRentData.map(houseRentData =>
rentsData.map(houseRentData =>
<HouseRentDetails houseRentData={houseRentData}></HouseRentDetails>)
}
</div>
Expand Down
10 changes: 6 additions & 4 deletions src/components/Home/Home/HouseRentDetails/HouseRentDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ import bed from '../../../../image/logos/bed 1.png';
import bath from '../../../../image/logos/bath 1.png';

const HouseRentDetails = ({ houseRentData }) => {
const { title, price, img, location} = {...houseRentData}

return (

<div className="col-md-4">
<div className="card mt-4">
<img className="card-img-top" src={houseRentData.img} alt="" />
<img className="card-img-top" src={img} alt="" />
<div className="card-body">
<h4 className="card-title">{houseRentData.title}</h4>
<h4 className="card-title">{title}</h4>
<div className="d-flex mb-2">

<img style={{ height: "20px" }} src={map} alt="" />
<p className="ml-3">Nasirabad H/S, Chattogram</p>
<p className="ml-3">{location}</p>

</div>
<div className="d-flex align-items-center">
Expand All @@ -28,7 +30,7 @@ const HouseRentDetails = ({ houseRentData }) => {
</div>
</div>
<div className="d-flex justify-content-between mt-4">
<h2 style={{ color: "#275A53", fontWeight: "bold", fontSize: "36px" }}>$194</h2>
<h2 style={{ color: "#275A53", fontWeight: "bold", fontSize: "36px" }}>${price}</h2>
<button className="btn" style={{ backgroundColor: "#275A53", color: "#F1F6F4" }}>View Details</button>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/HuntDetails/HuntGallery/HuntGallery.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import "./HuntGallery.css";

import hunt from "../../../image/images/Rectangle 406.png";
import hunt from "../../../image/images/Gorgeous house.png";

import sm1 from "../../../image/images/Rectangle 410.png";
import sm2 from "../../../image/images/Rectangle 409.png";
import sm3 from "../../../image/images/Rectangle 408.png";
import sm4 from "../../../image/images/Rectangle 407.png";
import sm1 from "../../../image/images/Gorgeous house.png";
import sm2 from "../../../image/images/Gorgeous house.png";
import sm3 from "../../../image/images/Gorgeous house.png";
import sm4 from "../../../image/images/Gorgeous house.png";
function HuntGallery() {
return (
<div className="hunt-gallery">
Expand Down
Binary file added src/image/images/Epic Huda Palacio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Family Apartment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Four.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Gorgeous house.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Luxury villa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/One.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/image/images/Rectangle 394.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 396.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 398.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 403.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 404.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 405.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 406.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 407.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 408.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 409.png
Binary file not shown.
Binary file removed src/image/images/Rectangle 410.png
Binary file not shown.
File renamed without changes
Binary file added src/image/images/Three.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Two.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Washington.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/image/images/Wonderfull.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 162585c

Please sign in to comment.