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 ( 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"> <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"> <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" /> <HomeIcon className="my-1 mx-auto h-6 w-6" aria-hidden="true" />
Home Home
@ -36,15 +36,17 @@ export function BottomNavBar() {
</a> </a>
</Link> </Link>
<Link href="/portfolio"> {user !== null && (
<a className="block w-full py-1 px-3 text-center hover:bg-indigo-200 hover:text-indigo-700"> <Link href="/portfolio">
<TableIcon className="my-1 mx-auto h-6 w-6" aria-hidden="true" /> <a className="block w-full py-1 px-3 text-center hover:bg-indigo-200 hover:text-indigo-700">
Portfolio <TableIcon className="my-1 mx-auto h-6 w-6" aria-hidden="true" />
</a> Portfolio
</Link> </a>
</Link>
)}
<div <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)} onClick={() => setSidebarOpen(true)}
> >
{user === null ? ( {user === null ? (