From 205be4521c3b708f61488ef93a34b41687068c4d Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Mon, 26 Feb 2024 21:15:24 +0000 Subject: [PATCH 1/3] feature-deck --- src/components/Deck/Deck.jsx | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/components/Deck/Deck.jsx b/src/components/Deck/Deck.jsx index 9760d2b..c9215bc 100644 --- a/src/components/Deck/Deck.jsx +++ b/src/components/Deck/Deck.jsx @@ -1,11 +1,20 @@ -// import Card from "@/components/Card/Card"; -// import "./Deck.scss"; -// import cardsData from "@/data/fakeCards.json"; +import Card from "@/components/Card/Card"; +import "./Deck.scss"; +import cardsData from "@/data/fakeCards.json"; -// const Deck = () => { -// you will need to map over the cardsData array and render a Card component for each card object -// how will you pass props to the Card component? +const Deck = (props) => { + return ( +
+ {cardsData.map((city, index) => ( + + ))} +
+ ); +}; -// }; - -// export default Deck; +export default Deck; From 8e63c3919374e09455b55d5f8fcdf1ea24e5602a Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Mon, 26 Feb 2024 21:33:56 +0000 Subject: [PATCH 2/3] card --- src/components/Card/Card.jsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index b93f799..a3dff1a 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -1,9 +1,15 @@ -// import "./Card.scss"; +import React from "react"; +import "./Card.scss"; -// const Card = ({ title, url, image }) => { -// return ( +const Card = (props) => { + const { title, url, image } = props; + return ( +
+

{title}

+ {title} + Visit {title} +
+ ); +}; -// ); -// }; - -// export default Card; +export default Card; From 747b76a4a85822ec5c73d14523acf528b0f1f7d2 Mon Sep 17 00:00:00 2001 From: Sabella-8 Date: Tue, 27 Feb 2024 11:52:29 +0000 Subject: [PATCH 3/3] feature-deck --- src/components/App/App.jsx | 3 ++- src/components/Card/Card.jsx | 2 +- src/data/fakeCards.json | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/App/App.jsx b/src/components/App/App.jsx index 7035044..2220914 100644 --- a/src/components/App/App.jsx +++ b/src/components/App/App.jsx @@ -1,12 +1,13 @@ import Bookings from "@/components/Bookings/Bookings.jsx"; import "./App.scss"; - +import Deck from "../Deck/Deck"; const App = () => (

CYF Hotel

+
); diff --git a/src/components/Card/Card.jsx b/src/components/Card/Card.jsx index a3dff1a..c9de6f9 100644 --- a/src/components/Card/Card.jsx +++ b/src/components/Card/Card.jsx @@ -7,7 +7,7 @@ const Card = (props) => {

{title}

{title} - Visit {title} + {title}
); }; diff --git a/src/data/fakeCards.json b/src/data/fakeCards.json index f8e5dfa..e29dfec 100644 --- a/src/data/fakeCards.json +++ b/src/data/fakeCards.json @@ -2,16 +2,16 @@ { "title": "Glasgow", "url": "https://peoplemakeglasgow.com", - "image": "placeholderImage.svg" + "image": "https://2f1a7f9478.visitscotland.net/binaries/content/gallery/visitscotland/cms-images/2023/04/06/queens-park" }, { "title": "Manchester", "url": "https://visitmanchester.com", - "image": "placeholderImage.svg" + "image": "https://media.wired.co.uk/photos/6357b98e09e6f1942a2a8a9a/16:9/w_1920,c_limit/HSBC%20MANCHESTER.jpeg" }, { "title": "London", "url": "https://visitlondon.com", - "image": "placeholderImage.svg" + "image": "https://media.istockphoto.com/id/1347665170/photo/london-at-sunset.jpg?s=1024x1024&w=is&k=20&c=ogVKCS26t23fSvgCO77CC_6mhtxMDk2cmBOUQ9VamYo=" } ]