Don't show portfolio when signed out. Home navigates to '/' when signed out.

This commit is contained in:
James Grugett 2022-04-10 00:26:19 -05:00
parent 642fedbbb4
commit 4a9fc7bc9b

View File

@ -22,7 +22,7 @@ export function BottomNavBar() {
return (
<nav className="fixed inset-x-0 bottom-0 z-20 flex justify-between border-t-2 bg-white text-xs text-gray-700 lg:hidden">
<Link href="/home">
<Link href={user ? '/home' : '/'}>
<a className="block w-full py-1 px-3 text-center transition duration-300 hover:bg-indigo-200 hover:text-indigo-700">
<HomeIcon className="my-1 mx-auto h-6 w-6" aria-hidden="true" />
Home
@ -36,15 +36,17 @@ export function BottomNavBar() {
</a>
</Link>
<Link href="/portfolio">
<a className="block w-full py-1 px-3 text-center hover:bg-indigo-200 hover:text-indigo-700">
<TableIcon className="my-1 mx-auto h-6 w-6" aria-hidden="true" />
Portfolio
</a>
</Link>
{user !== null && (
<Link href="/portfolio">
<a className="block w-full py-1 px-3 text-center hover:bg-indigo-200 hover:text-indigo-700">
<TableIcon className="my-1 mx-auto h-6 w-6" aria-hidden="true" />
Portfolio
</a>
</Link>
)}
<div
className="w-full py-1 px-3 text-center hover:cursor-pointer hover:bg-indigo-200 hover:text-indigo-700"
className="w-full select-none py-1 px-3 text-center hover:cursor-pointer hover:bg-indigo-200 hover:text-indigo-700"
onClick={() => setSidebarOpen(true)}
>
{user === null ? (