forked from phoenix/litellm-mirror
Merge pull request #3901 from BerriAI/admin_ui_add_logout_sso
[Feat] Implement Logout Admin UI
This commit is contained in:
commit
098df3dcd6
1 changed files with 10 additions and 0 deletions
|
@ -39,7 +39,9 @@ const Navbar: React.FC<NavbarProps> = ({
|
||||||
|
|
||||||
// const userColors = require('./ui_colors.json') || {};
|
// const userColors = require('./ui_colors.json') || {};
|
||||||
const isLocal = process.env.NODE_ENV === "development";
|
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 imageUrl = isLocal ? "http://localhost:4000/get_image" : "/get_image";
|
||||||
|
const logoutUrl = proxyBaseUrl ? `${proxyBaseUrl}` : `/`;
|
||||||
|
|
||||||
const items: MenuProps["items"] = [
|
const items: MenuProps["items"] = [
|
||||||
{
|
{
|
||||||
|
@ -52,6 +54,14 @@ const Navbar: React.FC<NavbarProps> = ({
|
||||||
</>
|
</>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "2",
|
||||||
|
label: (
|
||||||
|
<Link href={logoutUrl}>
|
||||||
|
<p>Logout</p>
|
||||||
|
</Link>
|
||||||
|
),
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue