diff --git a/ui/litellm-dashboard/src/components/navbar.test.tsx b/ui/litellm-dashboard/src/components/navbar.test.tsx index e33ec404916..bac9bfc7159 100644 --- a/ui/litellm-dashboard/src/components/navbar.test.tsx +++ b/ui/litellm-dashboard/src/components/navbar.test.tsx @@ -272,6 +272,13 @@ describe("Navbar", () => { expect(screen.queryByRole("button", { name: /^notifications$/i })).not.toBeInTheDocument(); }); + it("should keep the theme toggle on public pages", () => { + const publicPageProps = { ...defaultProps, isPublicPage: true }; + renderWithProviders(); + + expect(screen.getByRole("button", { name: /^theme$/i })).toBeInTheDocument(); + }); + it("should handle hide new feature indicators toggle", async () => { const user = userEvent.setup(); diff --git a/ui/litellm-dashboard/src/components/navbar.tsx b/ui/litellm-dashboard/src/components/navbar.tsx index 88cd125ea15..affb581f2dd 100644 --- a/ui/litellm-dashboard/src/components/navbar.tsx +++ b/ui/litellm-dashboard/src/components/navbar.tsx @@ -132,7 +132,7 @@ const Navbar: React.FC = ({ )} - + {showWorkerSwitch && ( @@ -153,17 +153,19 @@ const Navbar: React.FC = ({ )} - {!isPublicPage && ( - - - - - - - - + + + + {!isPublicPage && ( + <> + + + + + > + )} - )} +