Add tailwind #3

Merged
Irev-Dev merged 2 commits from add-tailwind into main 2020-10-14 10:35:34 +02:00
Showing only changes of commit 398ddc16eb - Show all commits

View File

@@ -1,6 +1,8 @@
import { Link, routes } from '@redwoodjs/router'
import { useAuth } from '@redwoodjs/auth'
const MainLayout = ({ children }) => {
const { logIn, logOut, isAuthenticated } = useAuth()
return (
<>
<header>
@@ -18,6 +20,11 @@ const MainLayout = ({ children }) => {
<li>
<Link to={routes.contact()}>Contact</Link>
</li>
<li>
<a href="#" onClick={isAuthenticated ? logOut : logIn}>
{isAuthenticated ? 'Log Out' : 'Log In'}
</a>
</li>
</ul>
</nav>
</header>