Skip to content

Commit

Permalink
added about to navbar and removed button like the design
Browse files Browse the repository at this point in the history
  • Loading branch information
bbland1 committed Oct 17, 2024
1 parent 19709f7 commit aa5bb76
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
6 changes: 5 additions & 1 deletion src/components/CreateList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ export function CreateList({ user, setListPath }: Props) {
/>
<br />
<div className="custom-button-wrapper">
<Button aria-label="Create new shopping list" type="submit">
<Button
className="custom-button"
aria-label="Create new shopping list"
type="submit"
>
Create List
</Button>
</div>
Expand Down
8 changes: 8 additions & 0 deletions src/components/authenticated/AuthenticatedNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ export function AuthenticatedNavBar() {
>
Manage List
</Nav.Link>
<Nav.Link
as={NavLink}
to="/about"
aria-label="About"
eventKey={"3"}
>
About
</Nav.Link>
</Nav>
</Navbar.Collapse>
<SignOutButton />
Expand Down
2 changes: 1 addition & 1 deletion src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body {
text-align: center;
border: none;
padding: 0.5rem;
width: 13rem;
width: max-content;

&:hover {
background-color: $secondary-blue;
Expand Down
13 changes: 1 addition & 12 deletions src/views/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from "react";
import { Outlet, useNavigate } from "react-router-dom";
import { Outlet } from "react-router-dom";
import { User } from "../api";
import { AuthenticatedNavBar, UnauthenticatedNavBar } from "../components";
import Button from "react-bootstrap/Button";

import "./Layout.scss";

Expand All @@ -11,22 +10,12 @@ interface Props {
}

export function Layout({ user }: Props) {
const navigate = useNavigate();
return (
<div className="Layout">
<header className="Layout-header">
{user ? <AuthenticatedNavBar /> : <UnauthenticatedNavBar />}
</header>
<main className="Layout-main overflow-auto">
{user && (
<Button
className="custom-button m-2"
onClick={() => navigate("/about")}
aria-label="Navigate to the about application page."
>
about
</Button>
)}
<Outlet />
</main>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/views/unauthenticated/UnauthenticatedHome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
align-items: center;
}

.custom-button-wrapper button {
@extend .button;
}
// .custom-button-wrapper button {
// @extend .button;
// }
4 changes: 3 additions & 1 deletion src/views/unauthenticated/UnauthenticatedHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ export function UnauthenticatedHome() {

<article>
<h5 className="heading-text">New to GrocerEase?</h5>
<div className="custom-button-wrapper">
<div className="custom-button-wrapper justify-content-evenly">
<Button
className="custom-button"
type="button"
onClick={() => navigate("/about")}
aria-label="Navigate to the about application page."
>
Expand Down

0 comments on commit aa5bb76

Please sign in to comment.