Skip to content

Commit

Permalink
Merge pull request #19 from the-collab-lab/dh/revert-issue-1
Browse files Browse the repository at this point in the history
  • Loading branch information
deeheber authored Aug 10, 2024
2 parents 021c08d + ce4faf8 commit e3b3c40
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable jsx-a11y/anchor-is-valid */
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 e3b3c40

Please sign in to comment.