Skip to content

Commit

Permalink
Update Layout.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahfallin authored Feb 3, 2024
1 parent 70b1244 commit 6a82760
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Outlet } from 'react-router-dom';

import './Layout.css';
import { auth } from '../api/config.js';
import { useAuth, SignInButton, SignOutButton } from '../api/useAuth.jsx';

/**
* TODO: The links defined in this file don't work!
Expand All @@ -13,20 +12,11 @@ import { useAuth, SignInButton, SignOutButton } from '../api/useAuth.jsx';
*/

export function Layout() {
const { user } = useAuth();
return (
<>
<div className="Layout">
<header className="Layout-header">
<h1>Smart shopping list</h1>
{!!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 6a82760

Please sign in to comment.