-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Built out HostVanDetail 'vans' routes, sub-navigation and correspondi…
…ng sub-sections
- Loading branch information
1 parent
9042519
commit f391854
Showing
12 changed files
with
269 additions
and
11 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { NavLink } from "react-router-dom" | ||
|
||
function HostVanDetailNav() { | ||
return ( | ||
<> | ||
<nav className="site-navigation hosts-nav"> | ||
<ul> | ||
<li> | ||
<NavLink | ||
to="." | ||
aria-current="page" | ||
end | ||
> | ||
DetailsInfo | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink | ||
to="pricing" | ||
aria-current="page" | ||
> | ||
Pricing | ||
</NavLink> | ||
</li> | ||
<li> | ||
<NavLink | ||
to="photos" | ||
aria-current="page" | ||
> | ||
Photos | ||
</NavLink> | ||
</li> | ||
</ul> | ||
</nav> | ||
</> | ||
) | ||
} | ||
|
||
export default HostVanDetailNav |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ function Nav() { | |
<ul> | ||
<li> | ||
<NavLink | ||
to="/" | ||
to="." | ||
aria-current="page" | ||
end | ||
> | ||
|
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
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,15 @@ | ||
import { useOutletContext } from "react-router-dom" | ||
|
||
function HostVanInfo() { | ||
const { van } = useOutletContext() | ||
return ( | ||
<section className="host-vans-section"> | ||
<div>Name: {van.name}</div> | ||
<div>Category: {van.type}</div> | ||
<div>Description: {van.description}</div> | ||
<div>Visibility: Public</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default HostVanInfo |
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,25 @@ | ||
import { useOutletContext } from "react-router-dom" | ||
|
||
function HostVanPhotos() { | ||
const { van } = useOutletContext() | ||
return ( | ||
<section className="host-vans-section"> | ||
<picture> | ||
<source | ||
srcSet={van.imageUrlWebp} | ||
type="image/webp" | ||
/> | ||
<img | ||
className="van-image" | ||
src={van.imageUrlPng} | ||
alt={`The ${van.name} van`} | ||
loading="lazy" | ||
width="881" | ||
height="881" | ||
/> | ||
</picture> | ||
</section> | ||
) | ||
} | ||
|
||
export default HostVanPhotos |
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,8 @@ | ||
import { useOutletContext } from "react-router-dom" | ||
|
||
function HostVanPricing() { | ||
const { van } = useOutletContext() | ||
return <section className="host-vans-section">£{van.price}/day</section> | ||
} | ||
|
||
export default HostVanPricing |
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
Oops, something went wrong.