text: import { Link, routes } from '@redwoodjs/router'
  import { useAuth } from '@redwoodjs/auth'
  
  const BlogLayout = ({ children }) => {
    const { logIn, logOut, isAuthenticated, currentUser } = useAuth()
    return <>
      <header>
        <h1>
            <Link to={routes.home()}>Redwood Blog</Link>
        </h1>
        <nav>
          <ul>
            <li>
              <Link to={routes.about()}>About</Link>
            </li>
            <li>
              <Link to={routes.contact()}>Contact</Link>
            </li>
            <li>
              <button onClick={isAuthenticated? logOut : logIn}>
                {isAuthenticated? 'Log out' : 'Log In'}
              </button>
            </li>
            {isAuthenticated && <li>{currentUser.email}</li>}
          </ul>
        </nav>
      </header>
      <main>{children}</main>
    </>
  }
  
  export default BlogLayout
  