forked from phoenix/litellm-mirror
build(ui): fix admin viewer issue
This commit is contained in:
parent
d1f4c83c31
commit
034ca95a94
15 changed files with 88 additions and 20 deletions
|
@ -16,6 +16,25 @@ const Sidebar: React.FC<SidebarProps> = ({
|
|||
userRole,
|
||||
defaultSelectedKey,
|
||||
}) => {
|
||||
if (userRole == "Admin Viewer") {
|
||||
return (
|
||||
<Layout style={{ minHeight: "100vh", maxWidth: "120px" }}>
|
||||
<Sider width={120}>
|
||||
<Menu
|
||||
mode="inline"
|
||||
defaultSelectedKeys={
|
||||
defaultSelectedKey ? defaultSelectedKey : ["1"]
|
||||
}
|
||||
style={{ height: "100%", borderRight: 0 }}
|
||||
>
|
||||
<Menu.Item key="1" onClick={() => setPage("usage")}>
|
||||
Usage
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
</Sider>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<Layout style={{ minHeight: "100vh", maxWidth: "120px" }}>
|
||||
<Sider width={120}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue