mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-08 03:48:14 +02:00
Fix noauth FE
This commit is contained in:
parent
d447b66039
commit
33a6b0c0ab
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user