From 0439360853cb8baa8ef831f187662eda5da11906 Mon Sep 17 00:00:00 2001 From: Batuhan Basoglu Date: Wed, 7 Apr 2021 20:11:28 -0400 Subject: [PATCH 1/4] Linked the listing pages. --- package.json | 12 +- public/assets/locales/en/translations.json | 5 +- public/assets/locales/fr/translations.json | 5 +- src/App.js | 10 +- src/homePage/Homepage.js | 14 +- src/listings-page/ListingsPage.js | 7 +- .../listing-page-1.css} | 2 +- .../listing-page-1.js} | 10 +- .../listing-page-1.test.js} | 6 +- .../single-listing-2/listing-page-2.css | 62 ++++++++ .../single-listing-2/listing-page-2.js | 139 ++++++++++++++++++ .../single-listing-2/listing-page-2.test.js | 10 ++ .../single-listing-3/listing-page-3.css | 62 ++++++++ .../single-listing-3/listing-page-3.js | 139 ++++++++++++++++++ .../single-listing-3/listing-page-3.test.js | 10 ++ .../single-listing-4/listing-page-4.css | 62 ++++++++ .../single-listing-4/listing-page-4.js | 139 ++++++++++++++++++ .../single-listing-4/listing-page-4.test.js | 10 ++ .../navbar-component/Navbar.js | 6 - 19 files changed, 675 insertions(+), 35 deletions(-) rename src/listings-page/{single-listing/listing-page.css => single-listing-1/listing-page-1.css} (97%) rename src/listings-page/{single-listing/listing-page.js => single-listing-1/listing-page-1.js} (96%) rename src/listings-page/{single-listing/listing-page.test.js => single-listing-1/listing-page-1.test.js} (53%) create mode 100644 src/listings-page/single-listing-2/listing-page-2.css create mode 100644 src/listings-page/single-listing-2/listing-page-2.js create mode 100644 src/listings-page/single-listing-2/listing-page-2.test.js create mode 100644 src/listings-page/single-listing-3/listing-page-3.css create mode 100644 src/listings-page/single-listing-3/listing-page-3.js create mode 100644 src/listings-page/single-listing-3/listing-page-3.test.js create mode 100644 src/listings-page/single-listing-4/listing-page-4.css create mode 100644 src/listings-page/single-listing-4/listing-page-4.js create mode 100644 src/listings-page/single-listing-4/listing-page-4.test.js diff --git a/package.json b/package.json index 0a896a8..f1b6b48 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,15 @@ "version": "0.1.0", "private": true, "dependencies": { + "@reach/combobox": "^0.10.5", + "@react-google-maps/api": "^1.9.0", "@testing-library/jest-dom": "^5.11.10", "@testing-library/react": "^11.2.5", "@testing-library/user-event": "^12.8.3", "axios": "^0.21.1", "bootstrap": "^4.6.0", "cors": "^2.8.5", + "date-fns": "^2.13.0", "email-validator": "^2.0.4", "express": "^4.17.1", "flag-icon-css": "^3.5.0", @@ -34,13 +37,10 @@ "react-router-dom": "^5.2.0", "react-scripts": "4.0.3", "react-select": "^4.3.0", - "spectre.css": "^0.5.9", - "web-vitals": "^1.1.1", - "@reach/combobox": "^0.10.2", - "@react-google-maps/api": "^1.9.0", - "date-fns": "^2.13.0", - "use-places-autocomplete": "^1.3.5", "reactstrap": "^8.9.0", + "spectre.css": "^0.5.9", + "use-places-autocomplete": "^1.3.5", + "web-vitals": "^1.1.1", "yup": "^0.32.9" }, "scripts": { diff --git a/public/assets/locales/en/translations.json b/public/assets/locales/en/translations.json index 02efad8..7514842 100644 --- a/public/assets/locales/en/translations.json +++ b/public/assets/locales/en/translations.json @@ -33,7 +33,10 @@ "Home5": "members who want to benefit from our deals. Above are some houses which can interest you. Feel free to", "Home6": "click the buttons above to explore the houses you want.", "Desc": "Description", - "Rooms": "1 Bedroom, 2 Bathroom", + "Rooms": "2 Bedroom, 3 Bathroom", + "Rooms1": "1 Bedroom, 1 Bathroom", + "Rooms2": "3 Bedroom, 3 Bathroom", + "Rooms3": "3 Bedroom, 3 Bathroom", "Danger1": "Message could not send.", "Danger2": "There are some errors in your contact form.", "Success1": "The message is successfully sent.", diff --git a/public/assets/locales/fr/translations.json b/public/assets/locales/fr/translations.json index 80b4871..16472aa 100644 --- a/public/assets/locales/fr/translations.json +++ b/public/assets/locales/fr/translations.json @@ -33,7 +33,10 @@ "Home5": "membres qui souhaitent bénéficier de nos offres. Ci-dessus, quelques maisons qui peuvent vous intéresser. N'hésitez", "Home6": "pas à cliquez sur les boutons ci-dessus pour explorer les maisons que vous souhaitez.", "Desc": "La Description", - "Rooms": "1 chambre, 2 salles de bains", + "Rooms": "2 chambre, 3 salles de bains", + "Rooms1": "1 chambre, 1 salles de bains", + "Rooms2": "3 chambre, 3 salles de bains", + "Rooms3": "3 chambre, 3 salles de bains", "Danger1": "Le message n'a pas pu être envoyé.", "Danger2": "Il y a des erreurs dans votre formulaire de contact.", "Success1": "Le message a été envoyé avec succès.", diff --git a/src/App.js b/src/App.js index 75af360..3f6afce 100644 --- a/src/App.js +++ b/src/App.js @@ -7,7 +7,10 @@ import Cookies from "js-cookie"; import HomePage from "./homePage/Homepage"; import ListingsPage from "./listings-page/ListingsPage"; import AgentPage from "./agent-page/AgentPage"; -import ListingPage from "./listings-page/single-listing/listing-page"; +import ListingPage1 from "./listings-page/single-listing-1/listing-page-1"; +import ListingPage2 from "./listings-page/single-listing-2/listing-page-2"; +import ListingPage3 from "./listings-page/single-listing-3/listing-page-3"; +import ListingPage4 from "./listings-page/single-listing-4/listing-page-4"; import Login from "./login-page/Login"; import Account from "./login-page/account/Account"; import ContactUs from "./shared-components/contact-us/contact-us"; @@ -74,7 +77,10 @@ function App() { - + + + + diff --git a/src/homePage/Homepage.js b/src/homePage/Homepage.js index dc2ce32..9fe829c 100644 --- a/src/homePage/Homepage.js +++ b/src/homePage/Homepage.js @@ -43,7 +43,7 @@ class Homepage extends Component {

100 Charlie Rogers, Kanata, ON K2V 1A7

{t("Rooms")}

- +
@@ -51,9 +51,9 @@ class Homepage extends Component { Second House

1490 Youville Drive, Orléans, ON K1C 2X8

-

{t("Rooms")}

+

{t("Rooms1")}

- +
@@ -61,9 +61,9 @@ class Homepage extends Component { Third House

8720 Russell Road, Navan, ON K4B 1J1

-

{t("Rooms")}

+

{t("Rooms2")}

- +
@@ -71,9 +71,9 @@ class Homepage extends Component { Fourth House

2785 8th Line Road, Metcalfe, ON K0A 2P0

-

{t("Rooms")}

+

{t("Rooms3")}

- +
diff --git a/src/listings-page/ListingsPage.js b/src/listings-page/ListingsPage.js index c9bbe8c..87e94a3 100644 --- a/src/listings-page/ListingsPage.js +++ b/src/listings-page/ListingsPage.js @@ -203,8 +203,8 @@ export default function ListingsPage() { > {listingData.Properties.map((house) => (budget >= house.PRICE || !budget) && - (bed == house.BEDS || !bed) && - (bath == house.BATHS || !bath) ? ( + (bed == house.BEDS || !bed) && + (bath == house.BATHS || !bath) ? (
- +
diff --git a/src/listings-page/single-listing/listing-page.css b/src/listings-page/single-listing-1/listing-page-1.css similarity index 97% rename from src/listings-page/single-listing/listing-page.css rename to src/listings-page/single-listing-1/listing-page-1.css index 137ea6b..a52f571 100644 --- a/src/listings-page/single-listing/listing-page.css +++ b/src/listings-page/single-listing-1/listing-page-1.css @@ -1,4 +1,4 @@ -.single-listing{ +.single-listing-1{ padding: 7% 15%; /* background-color: darksalmon; */ } diff --git a/src/listings-page/single-listing/listing-page.js b/src/listings-page/single-listing-1/listing-page-1.js similarity index 96% rename from src/listings-page/single-listing/listing-page.js rename to src/listings-page/single-listing-1/listing-page-1.js index 1be54ab..1d4d219 100644 --- a/src/listings-page/single-listing/listing-page.js +++ b/src/listings-page/single-listing-1/listing-page-1.js @@ -1,17 +1,17 @@ import React from "react"; -import "./listing-page.css"; +import "./listing-page-1.css"; import { Link } from "react-router-dom"; // import house images import house_img1 from "../../images/house1-2.jpg"; -const ListingPage = () => { +const ListingPage1 = () => { return ( -
+
{/* Listing header */}

- My title + 8720 Russell Road

@@ -136,4 +136,4 @@ const ListingPage = () => { // 2 ->https://pictureitsoldfl.com/wp-content/uploads/2016/07/305-Rudder-Cay-Way-Jupiter-FL-print-014-28-Family-Room-4200x2800-300dpi-1170x780.jpg // 3 ->https://www.tlcinteriors.com.au/wp-content/uploads/2018/06/hamptons-style-kitchen-from-metricon-bayville-display-home.jpg -export default ListingPage; +export default ListingPage1; diff --git a/src/listings-page/single-listing/listing-page.test.js b/src/listings-page/single-listing-1/listing-page-1.test.js similarity index 53% rename from src/listings-page/single-listing/listing-page.test.js rename to src/listings-page/single-listing-1/listing-page-1.test.js index bbe9600..07a81d5 100644 --- a/src/listings-page/single-listing/listing-page.test.js +++ b/src/listings-page/single-listing-1/listing-page-1.test.js @@ -1,10 +1,10 @@ import React from "react"; import { shallow } from "enzyme"; -import ListingPage from "./listing-page"; +import ListingPage1 from "./listing-page-1"; -describe("ListingPage", () => { +describe("ListingPage1", () => { test("matches snapshot", () => { - const wrapper = shallow(); + const wrapper = shallow(); expect(wrapper).toMatchSnapshot(); }); }); diff --git a/src/listings-page/single-listing-2/listing-page-2.css b/src/listings-page/single-listing-2/listing-page-2.css new file mode 100644 index 0000000..b119fbb --- /dev/null +++ b/src/listings-page/single-listing-2/listing-page-2.css @@ -0,0 +1,62 @@ +.single-listing-2{ + padding: 7% 15%; + /* background-color: darksalmon; */ +} + +.listing-header{ + border: 1px solid black; + text-align: left; + padding: 1%; +} +.listing-title{ + font-size: 2.5rem; + /* font-style: italic; */ +} + +.title-icon{ + +} + +.listing-carousel{ + margin: 5% 15%; + width: 70%; + /* padding-right: 10; */ +} + +.carousel-img{ + /* width: 70%; */ +} + + +.amentities{ + border: 1px solid black; + /* padding: 5% 0; */ + margin: 3% 40%; + padding: 1% 0%; +} +.amentities-text{ + +} +.amentities-icon{ + margin: 0% 5%; +} + +.description-box{ + border: 1px solid black; + padding: 5%; + text-align: left; +} + +.description-title{ + padding: 2% 0%; +} +.listing-description{ + + +} + +.booking-btn{ + padding: 2% 0%; + text-align: center; +} + diff --git a/src/listings-page/single-listing-2/listing-page-2.js b/src/listings-page/single-listing-2/listing-page-2.js new file mode 100644 index 0000000..254a831 --- /dev/null +++ b/src/listings-page/single-listing-2/listing-page-2.js @@ -0,0 +1,139 @@ +import React from "react"; +import "./listing-page-2.css"; +import { Link } from "react-router-dom"; + +// import house images +import house_img1 from "../../images/house1-2.jpg"; +const ListingPage2 = () => { + return ( +
+ {/* Listing header */} +
+
+

+ 1490 Youville Drive +

+
+
+ + {/* Carousel for images of the listings */} +
+ +
+ + {/* Text box for listing amenities */} +
+ 1 + + 2 + + 3 + +
+ + {/* Description for the listing */} +
+

Description

+

+ MOVE IN READY I WALKING DISTANCE TO SHOPPING, SCHOOLS AND TRANSIT I + Conveniently located in Haysboro, you have Restaurants, Groceries, + Coffee shops, Schools and a Library all within walking distance. This + Updated Bungalow offers over 2000 square feet of developed living + space, 3 Bedrooms upstairs to accommodate almost any family and 2 down + stairs in the fully developed basement. Having a separate entrance + downstairs through the backyard makes it much easier if you ever want + to convert the basement into a suite. The double garage is even heated + with 220v plus 2 additional spaces that could be used for RV parking + or for any additional vehicles in the house. You will notice the home + has been tastefully updated over the years including a soaker tub in + the bathroom, in the kitchen your cabinetry goes right to the ceiling + for a nice finished look, granite counters and Kitchenaid appliances + and a new garburator. The entire property has a fresh coat of paint + inside and out, Newer windows and roof along with the Plumbing, + Electrical (Cat 5 connection throughout and 200amp service) has been + updated. Last but not least, the back deck already has gas and ready + for the BBQ season. With the BIG updates being done, all that is left + to do is enjoy Summer on the deck or enjoy a bonfire in your sunny + West facing backyard! +

+
+ + + +
+
+
+ ); +}; + +// sources for the images used +//images.adsttc.com/media/images/524c/2511/e8e4/4e67/bf00/03c3/large_jpg/Tetris_House_03.jpg?1380721927 + +//House description +// ->Link 1 -https://www.realtor.ca/real-estate/23018057/9811-elbow-drive-calgary-haysboro +// images +// 1 ->house1.jpg +// 2 ->//images.adsttc.com/media/images/524c/2511/e8e4/4e67/bf00/03c3/large_jpg/Tetris_House_03.jpg?1380721927 +// 3 ->https://s3.amazonaws.com/on1-wp/wp-content/uploads/2018/08/3191-NW-Jenna-22-of-49v2-1024x683.jpg +//-> Link2 -> https://www.realtor.ca/real-estate/23020015/lot-14-67-seastone-drive-port-howe-port-howe +// 1 ->house2.jpg +// 2 ->https://static.photocdn.pt/images/articles/2019/12/24/How_to_Take_Gorgeous_Interior_Real_Estate_Photos.jpg +// 3 ->https://i.pinimg.com/originals/f3/72/87/f372870f4f99d3278193a3970aa394ce.jpg +//->Link3 -> https://www.realtor.ca/real-estate/23020040/1035-butler-boulevard-petawawa-laurentian-highlands +// 1 ->house3.jpg +// 2 ->https://miro.medium.com/max/1200/1*EyGqOwy0wQwKHUgi3xpQZA.png +// 3 ->https://i.pinimg.com/originals/9b/fe/76/9bfe76b23f7ed9dcb35f7553b8255f48.jpg +//->Link4 -> https://www.realtor.ca/real-estate/23020103/62-riddle-court-north-bay +// 1 ->house4.jpg +// 2 ->https://pictureitsoldfl.com/wp-content/uploads/2016/07/305-Rudder-Cay-Way-Jupiter-FL-print-014-28-Family-Room-4200x2800-300dpi-1170x780.jpg +// 3 ->https://www.tlcinteriors.com.au/wp-content/uploads/2018/06/hamptons-style-kitchen-from-metricon-bayville-display-home.jpg + +export default ListingPage2; diff --git a/src/listings-page/single-listing-2/listing-page-2.test.js b/src/listings-page/single-listing-2/listing-page-2.test.js new file mode 100644 index 0000000..a4006fe --- /dev/null +++ b/src/listings-page/single-listing-2/listing-page-2.test.js @@ -0,0 +1,10 @@ +import React from "react"; +import { shallow } from "enzyme"; +import ListingPage2 from "./listing-page-2"; + +describe("ListingPage2", () => { + test("matches snapshot", () => { + const wrapper = shallow(); + expect(wrapper).toMatchSnapshot(); + }); +}); diff --git a/src/listings-page/single-listing-3/listing-page-3.css b/src/listings-page/single-listing-3/listing-page-3.css new file mode 100644 index 0000000..4a50243 --- /dev/null +++ b/src/listings-page/single-listing-3/listing-page-3.css @@ -0,0 +1,62 @@ +.single-listing-3{ + padding: 7% 15%; + /* background-color: darksalmon; */ +} + +.listing-header{ + border: 1px solid black; + text-align: left; + padding: 1%; +} +.listing-title{ + font-size: 2.5rem; + /* font-style: italic; */ +} + +.title-icon{ + +} + +.listing-carousel{ + margin: 5% 15%; + width: 70%; + /* padding-right: 10; */ +} + +.carousel-img{ + /* width: 70%; */ +} + + +.amentities{ + border: 1px solid black; + /* padding: 5% 0; */ + margin: 3% 40%; + padding: 1% 0%; +} +.amentities-text{ + +} +.amentities-icon{ + margin: 0% 5%; +} + +.description-box{ + border: 1px solid black; + padding: 5%; + text-align: left; +} + +.description-title{ + padding: 2% 0%; +} +.listing-description{ + + +} + +.booking-btn{ + padding: 2% 0%; + text-align: center; +} + diff --git a/src/listings-page/single-listing-3/listing-page-3.js b/src/listings-page/single-listing-3/listing-page-3.js new file mode 100644 index 0000000..943f242 --- /dev/null +++ b/src/listings-page/single-listing-3/listing-page-3.js @@ -0,0 +1,139 @@ +import React from "react"; +import "./listing-page-3.css"; +import { Link } from "react-router-dom"; + +// import house images +import house_img1 from "../../images/house1-2.jpg"; +const ListingPage3 = () => { + return ( +
+ {/* Listing header */} +
+
+

+ 100 Charlie Rogers Place +

+
+
+ + {/* Carousel for images of the listings */} +
+ +
+ + {/* Text box for listing amenities */} +
+ 1 + + 2 + + 3 + +
+ + {/* Description for the listing */} +
+

Description

+

+ MOVE IN READY I WALKING DISTANCE TO SHOPPING, SCHOOLS AND TRANSIT I + Conveniently located in Haysboro, you have Restaurants, Groceries, + Coffee shops, Schools and a Library all within walking distance. This + Updated Bungalow offers over 2000 square feet of developed living + space, 3 Bedrooms upstairs to accommodate almost any family and 2 down + stairs in the fully developed basement. Having a separate entrance + downstairs through the backyard makes it much easier if you ever want + to convert the basement into a suite. The double garage is even heated + with 220v plus 2 additional spaces that could be used for RV parking + or for any additional vehicles in the house. You will notice the home + has been tastefully updated over the years including a soaker tub in + the bathroom, in the kitchen your cabinetry goes right to the ceiling + for a nice finished look, granite counters and Kitchenaid appliances + and a new garburator. The entire property has a fresh coat of paint + inside and out, Newer windows and roof along with the Plumbing, + Electrical (Cat 5 connection throughout and 200amp service) has been + updated. Last but not least, the back deck already has gas and ready + for the BBQ season. With the BIG updates being done, all that is left + to do is enjoy Summer on the deck or enjoy a bonfire in your sunny + West facing backyard! +

+
+ + + +
+
+
+ ); +}; + +// sources for the images used +//images.adsttc.com/media/images/524c/2511/e8e4/4e67/bf00/03c3/large_jpg/Tetris_House_03.jpg?1380721927 + +//House description +// ->Link 1 -https://www.realtor.ca/real-estate/23018057/9811-elbow-drive-calgary-haysboro +// images +// 1 ->house1.jpg +// 2 ->//images.adsttc.com/media/images/524c/2511/e8e4/4e67/bf00/03c3/large_jpg/Tetris_House_03.jpg?1380721927 +// 3 ->https://s3.amazonaws.com/on1-wp/wp-content/uploads/2018/08/3191-NW-Jenna-22-of-49v2-1024x683.jpg +//-> Link2 -> https://www.realtor.ca/real-estate/23020015/lot-14-67-seastone-drive-port-howe-port-howe +// 1 ->house2.jpg +// 2 ->https://static.photocdn.pt/images/articles/2019/12/24/How_to_Take_Gorgeous_Interior_Real_Estate_Photos.jpg +// 3 ->https://i.pinimg.com/originals/f3/72/87/f372870f4f99d3278193a3970aa394ce.jpg +//->Link3 -> https://www.realtor.ca/real-estate/23020040/1035-butler-boulevard-petawawa-laurentian-highlands +// 1 ->house3.jpg +// 2 ->https://miro.medium.com/max/1200/1*EyGqOwy0wQwKHUgi3xpQZA.png +// 3 ->https://i.pinimg.com/originals/9b/fe/76/9bfe76b23f7ed9dcb35f7553b8255f48.jpg +//->Link4 -> https://www.realtor.ca/real-estate/23020103/62-riddle-court-north-bay +// 1 ->house4.jpg +// 2 ->https://pictureitsoldfl.com/wp-content/uploads/2016/07/305-Rudder-Cay-Way-Jupiter-FL-print-014-28-Family-Room-4200x2800-300dpi-1170x780.jpg +// 3 ->https://www.tlcinteriors.com.au/wp-content/uploads/2018/06/hamptons-style-kitchen-from-metricon-bayville-display-home.jpg + +export default ListingPage3; diff --git a/src/listings-page/single-listing-3/listing-page-3.test.js b/src/listings-page/single-listing-3/listing-page-3.test.js new file mode 100644 index 0000000..3cc850d --- /dev/null +++ b/src/listings-page/single-listing-3/listing-page-3.test.js @@ -0,0 +1,10 @@ +import React from "react"; +import { shallow } from "enzyme"; +import ListingPage3 from "./listing-page-3"; + +describe("ListingPage3", () => { + test("matches snapshot", () => { + const wrapper = shallow(); + expect(wrapper).toMatchSnapshot(); + }); +}); diff --git a/src/listings-page/single-listing-4/listing-page-4.css b/src/listings-page/single-listing-4/listing-page-4.css new file mode 100644 index 0000000..4e378ec --- /dev/null +++ b/src/listings-page/single-listing-4/listing-page-4.css @@ -0,0 +1,62 @@ +.single-listing-4{ + padding: 7% 15%; + /* background-color: darksalmon; */ +} + +.listing-header{ + border: 1px solid black; + text-align: left; + padding: 1%; +} +.listing-title{ + font-size: 2.5rem; + /* font-style: italic; */ +} + +.title-icon{ + +} + +.listing-carousel{ + margin: 5% 15%; + width: 70%; + /* padding-right: 10; */ +} + +.carousel-img{ + /* width: 70%; */ +} + + +.amentities{ + border: 1px solid black; + /* padding: 5% 0; */ + margin: 3% 40%; + padding: 1% 0%; +} +.amentities-text{ + +} +.amentities-icon{ + margin: 0% 5%; +} + +.description-box{ + border: 1px solid black; + padding: 5%; + text-align: left; +} + +.description-title{ + padding: 2% 0%; +} +.listing-description{ + + +} + +.booking-btn{ + padding: 2% 0%; + text-align: center; +} + diff --git a/src/listings-page/single-listing-4/listing-page-4.js b/src/listings-page/single-listing-4/listing-page-4.js new file mode 100644 index 0000000..28ac22e --- /dev/null +++ b/src/listings-page/single-listing-4/listing-page-4.js @@ -0,0 +1,139 @@ +import React from "react"; +import "./listing-page-4.css"; +import { Link } from "react-router-dom"; + +// import house images +import house_img1 from "../../images/house1-2.jpg"; +const ListingPage4 = () => { + return ( +
+ {/* Listing header */} +
+
+

+ 2785 8th Line Road +

+
+
+ + {/* Carousel for images of the listings */} +
+ +
+ + {/* Text box for listing amenities */} +
+ 1 + + 2 + + 3 + +
+ + {/* Description for the listing */} +
+

Description

+

+ MOVE IN READY I WALKING DISTANCE TO SHOPPING, SCHOOLS AND TRANSIT I + Conveniently located in Haysboro, you have Restaurants, Groceries, + Coffee shops, Schools and a Library all within walking distance. This + Updated Bungalow offers over 2000 square feet of developed living + space, 3 Bedrooms upstairs to accommodate almost any family and 2 down + stairs in the fully developed basement. Having a separate entrance + downstairs through the backyard makes it much easier if you ever want + to convert the basement into a suite. The double garage is even heated + with 220v plus 2 additional spaces that could be used for RV parking + or for any additional vehicles in the house. You will notice the home + has been tastefully updated over the years including a soaker tub in + the bathroom, in the kitchen your cabinetry goes right to the ceiling + for a nice finished look, granite counters and Kitchenaid appliances + and a new garburator. The entire property has a fresh coat of paint + inside and out, Newer windows and roof along with the Plumbing, + Electrical (Cat 5 connection throughout and 200amp service) has been + updated. Last but not least, the back deck already has gas and ready + for the BBQ season. With the BIG updates being done, all that is left + to do is enjoy Summer on the deck or enjoy a bonfire in your sunny + West facing backyard! +

+
+ + + +
+
+
+ ); +}; + +// sources for the images used +//images.adsttc.com/media/images/524c/2511/e8e4/4e67/bf00/03c3/large_jpg/Tetris_House_03.jpg?1380721927 + +//House description +// ->Link 1 -https://www.realtor.ca/real-estate/23018057/9811-elbow-drive-calgary-haysboro +// images +// 1 ->house1.jpg +// 2 ->//images.adsttc.com/media/images/524c/2511/e8e4/4e67/bf00/03c3/large_jpg/Tetris_House_03.jpg?1380721927 +// 3 ->https://s3.amazonaws.com/on1-wp/wp-content/uploads/2018/08/3191-NW-Jenna-22-of-49v2-1024x683.jpg +//-> Link2 -> https://www.realtor.ca/real-estate/23020015/lot-14-67-seastone-drive-port-howe-port-howe +// 1 ->house2.jpg +// 2 ->https://static.photocdn.pt/images/articles/2019/12/24/How_to_Take_Gorgeous_Interior_Real_Estate_Photos.jpg +// 3 ->https://i.pinimg.com/originals/f3/72/87/f372870f4f99d3278193a3970aa394ce.jpg +//->Link3 -> https://www.realtor.ca/real-estate/23020040/1035-butler-boulevard-petawawa-laurentian-highlands +// 1 ->house3.jpg +// 2 ->https://miro.medium.com/max/1200/1*EyGqOwy0wQwKHUgi3xpQZA.png +// 3 ->https://i.pinimg.com/originals/9b/fe/76/9bfe76b23f7ed9dcb35f7553b8255f48.jpg +//->Link4 -> https://www.realtor.ca/real-estate/23020103/62-riddle-court-north-bay +// 1 ->house4.jpg +// 2 ->https://pictureitsoldfl.com/wp-content/uploads/2016/07/305-Rudder-Cay-Way-Jupiter-FL-print-014-28-Family-Room-4200x2800-300dpi-1170x780.jpg +// 3 ->https://www.tlcinteriors.com.au/wp-content/uploads/2018/06/hamptons-style-kitchen-from-metricon-bayville-display-home.jpg + +export default ListingPage4; diff --git a/src/listings-page/single-listing-4/listing-page-4.test.js b/src/listings-page/single-listing-4/listing-page-4.test.js new file mode 100644 index 0000000..826dc1b --- /dev/null +++ b/src/listings-page/single-listing-4/listing-page-4.test.js @@ -0,0 +1,10 @@ +import React from "react"; +import { shallow } from "enzyme"; +import ListingPage4 from "./listing-page-4"; + +describe("ListingPage4", () => { + test("matches snapshot", () => { + const wrapper = shallow(); + expect(wrapper).toMatchSnapshot(); + }); +}); diff --git a/src/shared-components/navbar-component/Navbar.js b/src/shared-components/navbar-component/Navbar.js index 42cfa11..f01c618 100644 --- a/src/shared-components/navbar-component/Navbar.js +++ b/src/shared-components/navbar-component/Navbar.js @@ -50,12 +50,6 @@ const Navbar = () => { -
  • - - {t("Nav_listing_page")} - -
  • -
  • {t("Nav_Login")} From b6acd352e71d82afbd681e595784d692b0bc964c Mon Sep 17 00:00:00 2001 From: soyed Date: Wed, 7 Apr 2021 20:24:56 -0400 Subject: [PATCH 2/4] moved the translations button and validating the login form --- src/App.js | 57 +------------------ src/login-page/Login.js | 23 +++++--- src/login-page/account/Account.js | 3 +- .../navbar-component/Navbar.js | 52 ++++++++++++++++- 4 files changed, 68 insertions(+), 67 deletions(-) diff --git a/src/App.js b/src/App.js index 75af360..fd1ea5f 100644 --- a/src/App.js +++ b/src/App.js @@ -1,9 +1,7 @@ -import React, { useEffect } from "react"; +import React from "react"; import Footer from "./shared-components/footer-component/Footer"; import Navbar from "./shared-components/navbar-component/Navbar"; import { BrowserRouter, Route, Switch } from "react-router-dom"; -import i18next from "i18next"; -import Cookies from "js-cookie"; import HomePage from "./homePage/Homepage"; import ListingsPage from "./listings-page/ListingsPage"; import AgentPage from "./agent-page/AgentPage"; @@ -12,62 +10,9 @@ import Login from "./login-page/Login"; import Account from "./login-page/account/Account"; import ContactUs from "./shared-components/contact-us/contact-us"; -const langauges = [ - { - code: "fr", - name: "Français", - country_code: "fr", - }, - { - code: "en", - name: "English", - country_code: "gb", - }, -]; - function App() { - const currentLanguageCode = Cookies.get("i18next") || "en"; - const currentLanguage = langauges.find( - (lang) => lang.code === currentLanguageCode - ); - - useEffect(() => { - document.body.dir = currentLanguage.dir || "ltr"; - }, [currentLanguage]); return (
    - {/* create the translations button */} -
    -
    - {/* */} -
    - - -
    -
    -
    diff --git a/src/login-page/Login.js b/src/login-page/Login.js index f260a7a..276856a 100644 --- a/src/login-page/Login.js +++ b/src/login-page/Login.js @@ -14,14 +14,20 @@ class Login extends Component { }, }; - handleLogin = (e) => { - console.log(e); - }; + handleLogin() { + // if ( !== this.state.Account.email) { + // alert("invalid"); + // } + // if (password !== this.state.Account.password) { + // alert("invalid"); + // } + } + render() { const { t } = this.props; return (
    -
    + app-logo

    {t("Login_header")}

    {t("Login_message")}

    @@ -61,11 +67,10 @@ class Login extends Component {
    - - - + +
    diff --git a/src/login-page/account/Account.js b/src/login-page/account/Account.js index 9097434..92ca733 100644 --- a/src/login-page/account/Account.js +++ b/src/login-page/account/Account.js @@ -11,6 +11,7 @@ class Account extends Component { lastName: "Green", email: "kevon.green@kcribs.com", password: "Kcribs123", + phoneNumber: "613-234-8796", }, }; render() { @@ -93,7 +94,7 @@ class Account extends Component { type="text" class="form-control" id="account-phoneNumber" - placeholder={this.state.Account.email} + placeholder={this.state.Account.phoneNumber} required disabled={true} /> diff --git a/src/shared-components/navbar-component/Navbar.js b/src/shared-components/navbar-component/Navbar.js index 42cfa11..05d5de1 100644 --- a/src/shared-components/navbar-component/Navbar.js +++ b/src/shared-components/navbar-component/Navbar.js @@ -1,11 +1,33 @@ -import React from "react"; +import React, { useEffect } from "react"; import { Link, withRouter } from "react-router-dom"; import "./Navbar.css"; import logo from "./logo2.png"; +import Cookies from "js-cookie"; /* eslint-disable jsx-a11y/anchor-is-valid */ import { useTranslation } from "react-i18next"; +import i18next from "i18next"; +const langauges = [ + { + code: "fr", + name: "Français", + country_code: "fr", + }, + { + code: "en", + name: "English", + country_code: "gb", + }, +]; + const Navbar = () => { + const currentLanguageCode = Cookies.get("i18next") || "en"; + const currentLanguage = langauges.find( + (lang) => lang.code === currentLanguageCode + ); const { t } = useTranslation(); + useEffect(() => { + document.body.dir = currentLanguage.dir || "ltr"; + }, [currentLanguage]); return ( /* Nav Bar */
    @@ -27,6 +49,34 @@ const Navbar = () => {