-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sidebar for mobile display
- Loading branch information
1 parent
d056952
commit 8c1907b
Showing
4 changed files
with
92 additions
and
41 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,32 @@ | ||
import { Link } from "react-router-dom"; | ||
import * as PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
export function NavBarList(props) { | ||
return ( | ||
<> | ||
<li> | ||
<Link to="/restaurants/create">Create Restaurants And Meals</Link> | ||
</li> | ||
|
||
<li> | ||
<Link to="/restaurants">All Restaurants</Link> | ||
</li> | ||
<li> | ||
<Link to="/orders">Your Orders</Link> | ||
</li> | ||
<li> | ||
<b>Hey there,</b> {(props.user.name || "").split(" ")[0]} | ||
</li> | ||
<li> | ||
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */} | ||
<a onClick={props.onClick}>Logout</a> | ||
</li> | ||
</> | ||
); | ||
} | ||
|
||
NavBarList.propTypes = { | ||
user: PropTypes.any, | ||
onClick: PropTypes.func | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,13 @@ | ||
.list-margin li { | ||
margin-right: 10px; | ||
} | ||
|
||
.show-on-med-and-down { | ||
display: none; | ||
} | ||
|
||
@media only screen and (max-width: 992px) { | ||
.show-on-med-and-down { | ||
display: block; | ||
} | ||
} |