Skip to content

Commit

Permalink
Merge pull request #48 from the-collab-lab/ar-navbar-updates-issue-19
Browse files Browse the repository at this point in the history
Ar navbar updates issue 19
  • Loading branch information
arandel1 authored Oct 2, 2024
2 parents 75f72f8 + 89e9451 commit bb1a97f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/api/useAuth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ export const SignInButton = () => (
* A button that signs the user out of the app using Firebase Auth.
*/
export const SignOutButton = () => (
<button type="button" onClick={() => auth.signOut()}>
<button
type="button"
onClick={() => auth.signOut() && window.location.reload()}
>
Sign Out
</button>
);
Expand Down
4 changes: 3 additions & 1 deletion src/views/Layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
padding-bottom: max(env(safe-area-inset-bottom), 1rem);
padding-top: 1rem;
place-content: center;
position: fixed;
/* position: fixed; */
width: 100%;
}

Expand All @@ -53,6 +53,8 @@
flex-direction: row;
justify-content: space-evenly;
width: min(72ch, 100%);
/* position: fixed;
top: 0; */
}

.Nav-link {
Expand Down
10 changes: 6 additions & 4 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ export function Layout() {
<header className="Layout-header">
<h1>Smart shopping list</h1>
</header>
<main className="Layout-main">
{user ? <SignOutButton /> : <SignInButton />}
<Outlet />
</main>
<nav className="Nav">
<div className="Nav-container">
<NavLink to="/" style={handleActive}>
Expand All @@ -44,8 +40,14 @@ export function Layout() {
<NavLink to="/manage-list" style={handleActive}>
Manage List
</NavLink>

{user ? <SignOutButton /> : <SignInButton />}
</div>
</nav>

<main className="Layout-main">
<Outlet />
</main>
</div>
</>
);
Expand Down

0 comments on commit bb1a97f

Please sign in to comment.