Skip to content

Commit

Permalink
add user signed in information
Browse files Browse the repository at this point in the history
  • Loading branch information
raaynaldo committed Feb 4, 2024
1 parent 061c015 commit 601142c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/views/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ export function Layout() {
<div className="Layout">
<header className="Layout-header">
<h1>Smart shopping list</h1>
{user ? <SignOutButton /> : <SignInButton />}
{!!user ? (
<div>
<span>Signed in as {auth.currentUser.displayName}</span> (
<SignOutButton />)
</div>
) : (
<SignInButton />
)}
</header>
<main className="Layout-main">
<Outlet />
Expand Down

0 comments on commit 601142c

Please sign in to comment.