mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
Merge pull request #35041 from BerriAI/litellm_/ui-perf-regression-d7888c
fix(ui): point the navbar and sidebar logos at the dashboard home route
This commit is contained in:
parent
2348ccc977
commit
74244ddd45
4 changed files with 15 additions and 2 deletions
|
|
@ -80,6 +80,12 @@ describe("Sidebar (leftnav)", () => {
|
|||
collapsed: false,
|
||||
};
|
||||
|
||||
it("should link the logo to the UI home route rather than the proxy origin", () => {
|
||||
renderWithProviders(<Sidebar {...defaultProps} />);
|
||||
|
||||
expect(screen.getByRole("link", { name: /litellm home/i })).toHaveAttribute("href", "/ui");
|
||||
});
|
||||
|
||||
it("renders all top-level (non-nested) tabs for admin", () => {
|
||||
renderWithProviders(<Sidebar {...defaultProps} />);
|
||||
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ const Sidebar_: React.FC<SidebarProps> = ({
|
|||
<SidebarHeader className="h-14 border-b border-border group-data-[collapsed=true]/sidebar:h-auto">
|
||||
<div className="flex items-center justify-between gap-2 group-data-[collapsed=true]/sidebar:flex-col">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
<Link href={baseUrl || "/"} className="flex min-w-0 items-center" aria-label="LiteLLM home">
|
||||
<Link href={migratedHref("")} className="flex min-w-0 items-center" aria-label="LiteLLM home">
|
||||
<img
|
||||
src={logoSrc}
|
||||
alt="LiteLLM"
|
||||
|
|
|
|||
|
|
@ -152,6 +152,12 @@ describe("Navbar", () => {
|
|||
expect(screen.getByRole("button", { name: /open account menu/i })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("should link the logo to the UI home route rather than the proxy origin", () => {
|
||||
renderWithProviders(<Navbar {...defaultProps} />);
|
||||
|
||||
expect(screen.getByRole("link", { name: /litellm brand/i })).toHaveAttribute("href", "/ui");
|
||||
});
|
||||
|
||||
it("should display user information in dropdown", async () => {
|
||||
const user = userEvent.setup();
|
||||
renderWithProviders(<Navbar {...defaultProps} />);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { useDisableBouncingIcon } from "@/app/(dashboard)/hooks/useDisableBounci
|
|||
import { useDisableShowPrompts } from "@/app/(dashboard)/hooks/useDisableShowPrompts";
|
||||
import { useWorker } from "@/hooks/useWorker";
|
||||
import { getProxyBaseUrl } from "@/components/networking";
|
||||
import { migratedHref } from "@/utils/migratedPages";
|
||||
import { useTheme } from "@/contexts/ThemeContext";
|
||||
import { clearTokenCookies } from "@/utils/cookieUtils";
|
||||
import { clearStoredReturnUrl, getLoginUrl } from "@/utils/returnUrlUtils";
|
||||
|
|
@ -75,7 +76,7 @@ const Navbar: React.FC<NavbarProps> = ({
|
|||
)}
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<Link href={baseUrl ? baseUrl : "/"} className="flex items-center">
|
||||
<Link href={migratedHref("")} className="flex items-center">
|
||||
<div className="relative">
|
||||
<div className="flex h-10 max-w-48 items-center justify-center overflow-hidden">
|
||||
<img
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue