Fix noauth FE

This commit is contained in:
Weves 2023-05-16 21:25:03 -07:00 committed by Chris Weaver
parent d447b66039
commit 33a6b0c0ab

View File

@ -74,13 +74,15 @@ export const Header: React.FC<HeaderProps> = ({ user }) => {
"w-36 overflow-hidden shadow-xl z-10 text-sm text-gray-300"
}
>
{user?.role === "admin" && (
<Link href="/admin/indexing/status">
<div className="flex py-2 px-3 cursor-pointer hover:bg-gray-500 border-b border-gray-500">
Connectors
</div>
</Link>
)}
{/* Show connector option if (1) auth is disabled or (2) user is an admin */}
{!user ||
(user.role === "admin" && (
<Link href="/admin/indexing/status">
<div className="flex py-2 px-3 cursor-pointer hover:bg-gray-500 border-b border-gray-500">
Connectors
</div>
</Link>
))}
{user && (
<div
className="flex py-2 px-3 cursor-pointer hover:bg-gray-500"