Skip to content

Commit

Permalink
Update navbar (#1)
Browse files Browse the repository at this point in the history
* Update navbar

* Update profile message to match new navbar

* sign in dropdown fix
  • Loading branch information
marissahalim committed Nov 13, 2023
1 parent bfb0331 commit d4b0312
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions app/imports/ui/components/NavBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ const NavBar = () => {
<Navbar.Collapse id="basic-navbar-nav" color="white">
<Nav className="me-auto justify-content-start">
{currentUser ? ([
<Nav.Link id="add-sim-nav" as={NavLink} to="/SimGenerator" key="simGenerator">Simulation</Nav.Link>,
<Nav.Link id="add-model-nav" as={NavLink} to="/NewModel" key="addModel">New Model</Nav.Link>,
<Nav.Link id="discussions" as={NavLink} to="/Discussions" key="discussions">Discussions</Nav.Link>,
<Nav.Link id="view-gallery-nav" as={NavLink} to="/gallery" key="viewGallery">Gallery</Nav.Link>,
<NavDropdown title="Upload" key="upload-new-nav" align="down-centered">
<NavDropdown.Item id="add-model-nav" as={NavLink} to="/NewModel" key="addModel">New Model</NavDropdown.Item>
<NavDropdown.Item id="add-sim-nav" as={NavLink} to="/SimGenerator" key="simGenerator">New Simulation</NavDropdown.Item>
</NavDropdown>,
<Nav.Link id="statistics" as={NavLink} to="/Statistics" key="statistics">Statistics</Nav.Link>,
<Nav.Link id="discussions" as={NavLink} to="/Discussions" key="discussions">Discussions</Nav.Link>,
]) : ''}

</Nav>
Expand All @@ -51,7 +53,7 @@ const NavBar = () => {
</NavDropdown.Item>
</NavDropdown>
) : (
<NavDropdown id="navbar-current-user" title={currentUser} key="User">
<NavDropdown id="navbar-current-user" title={currentUser} align="end" key="User">
<NavDropdown.Item id="navbar-profile" as={NavLink} key="profile" to="/profile">
<BsPersonSquare />
{' '}
Expand Down
4 changes: 2 additions & 2 deletions app/imports/ui/pages/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Profile = () => {
</Row>
{myModels.length === 0 ? (
// eslint-disable-next-line react/no-unescaped-entities
<h4 className="my-3"> You haven't uploaded any models yet. Head to the New Model tab to start. </h4>
<h4 className="my-3"> You haven't uploaded any models yet. Head to Upload tab and select New Model to start. </h4>
) : (
<Row xs={2} md={3} lg={4}>
{myModels.map((model) => <ModelItem key={model._id} model={model} />)}
Expand All @@ -98,7 +98,7 @@ const Profile = () => {
</Row>
{mySims.length === 0 ? (
// eslint-disable-next-line react/no-unescaped-entities
<h4 className="my-3"> You haven't made any simulations yet. Head to the Simulation tab to start. </h4>
<h4 className="my-3"> You haven't made any simulations yet. Head to the Upload tab and select New Simulation to start. </h4>
) : (
<Row xs={2} md={3} lg={4}>
{mySims.map((sim) => <SimulationItem key={sim._id} sim={sim} />)}
Expand Down

0 comments on commit d4b0312

Please sign in to comment.