Skip to content

Commit

Permalink
Removed usage of useAuth hook and related autentication logic, revert…
Browse files Browse the repository at this point in the history
…ing code added for issue #1
  • Loading branch information
tannaurus committed Aug 11, 2024
1 parent b036e08 commit 2f957a1
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/views/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,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 +11,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 2f957a1

Please sign in to comment.