This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 767
London10 - Khalil Alhaydr - CYF-hotel-challenge #614
Open
Khlil1313
wants to merge
1
commit into
CodeYourFuture:master
Choose a base branch
from
Khlil1313:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const FooterElement = [ | ||
{address: "123 Fake Street, London, E1 4UD", email: "[email protected]", phoneNumber: "0123 456789",} | ||
]; | ||
|
||
function Footer(FooterElement) { | ||
return ( | ||
<> | ||
<ul> | ||
<li>{FooterElement.address}</li> | ||
<li>{FooterElement.email}</li> | ||
<li>{FooterElement.phoneNumber}</li> | ||
</ul> | ||
</> | ||
); | ||
} | ||
|
||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
|
||
const header = () => { | ||
return ( | ||
<div> | ||
<header className="App-header">CYF Hotel</header>; | ||
<img className="Logo-image" src="https://images.unsplash.com/photo-1615880484746-a134be9a6ecf?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8bW91bnRhaW4lMjBob3RlbHxlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=500&q=60"></img> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great work, sometimes it is good practice to add 'alt' incase the image doesn't load. More info here.) |
||
); | ||
} | ||
|
||
export default header; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
const SearchButton = () => { | ||
return (<button className="btn btn-primary">Search</button> ) | ||
} | ||
|
||
export default SearchButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from "react"; | ||
|
||
const city = [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Small thing but up to you it may be better to rename this to 'cities' as it is an array of cities. |
||
{ | ||
name: "London", | ||
src: "https://images.unsplash.com/photo-1529655683826-aba9b3e77383?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8TG9uZG9ufGVufDB8fDB8fHww&auto=format&fit=crop&w=500&q=60", | ||
description: "London is the capital of the UK", | ||
href: "https://www.visitlondon.com/", | ||
}, | ||
{ | ||
name: "Manchester", | ||
src: "https://images.unsplash.com/photo-1627226890711-fd1fdc35d77e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8bWFuY2hlc3RlcnxlbnwwfHwwfHx8MA%3D%3D&auto=format&fit=crop&w=500&q=60", | ||
description: "Manchester is the biggest city in the north of England", | ||
href: "https://www.visitmanchester.com/", | ||
}, | ||
{ | ||
name: "Glasgow", | ||
src: "https://images.unsplash.com/photo-1558098362-b1ee175ef8d6?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTh8fEdsYXNnb3d8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60", | ||
description: "Glasgow is the second most important city in Scotland", | ||
href: "http://peoplemakeglasgow.com/", | ||
}, | ||
]; | ||
|
||
const TouristInfoCards = ({cityId}) => { | ||
|
||
return ( | ||
<div className="CitiesDiv"> | ||
<div className="card"> | ||
<img src={city[cityId].src} className="card-img-top" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is it possible to restructure |
||
<div className="card-body"> | ||
<h2>{city[cityId].description}</h2> | ||
<p>{city[cityId].description}</p> | ||
<a href={city[cityId].href} className="btn btn-primary"> | ||
More information. | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default TouristInfoCards; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to move these cityIds into a variable rather than each one individually?