Merge pull request #3901 from BerriAI/admin_ui_add_logout_sso

[Feat] Implement Logout Admin UI
This commit is contained in:
Ishaan Jaff 2024-05-29 14:36:12 -07:00 committed by GitHub
commit 098df3dcd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,7 +39,9 @@ const Navbar: React.FC<NavbarProps> = ({
// const userColors = require('./ui_colors.json') || {};
const isLocal = process.env.NODE_ENV === "development";
const proxyBaseUrl = isLocal ? "http://localhost:4000" : null;
const imageUrl = isLocal ? "http://localhost:4000/get_image" : "/get_image";
const logoutUrl = proxyBaseUrl ? `${proxyBaseUrl}` : `/`;
const items: MenuProps["items"] = [
{
@ -52,6 +54,14 @@ const Navbar: React.FC<NavbarProps> = ({
</>
),
},
{
key: "2",
label: (
<Link href={logoutUrl}>
<p>Logout</p>
</Link>
),
}
];
return (