mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
feat(ui): use Lighthouse icon and "Home" label in sidebar nav toggle
This commit is contained in:
@@ -128,7 +128,7 @@ describe("SidebarNavigationModeToggle", () => {
|
||||
expect(pushMock).toHaveBeenCalledWith("/lighthouse");
|
||||
});
|
||||
|
||||
it("does not navigate when Browse mode is selected", async () => {
|
||||
it("does not navigate when Home mode is selected", async () => {
|
||||
// Given
|
||||
const user = userEvent.setup();
|
||||
const onChange = vi.fn();
|
||||
@@ -142,7 +142,7 @@ describe("SidebarNavigationModeToggle", () => {
|
||||
);
|
||||
|
||||
// When
|
||||
await user.click(screen.getByRole("button", { name: "Browse" }));
|
||||
await user.click(screen.getByRole("button", { name: "Home" }));
|
||||
|
||||
// Then
|
||||
expect(onChange).toHaveBeenCalledWith(SIDEBAR_NAVIGATION_MODE.BROWSE);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import { Bot, LayoutDashboard } from "lucide-react";
|
||||
import { LayoutDashboard } from "lucide-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { LighthouseIcon } from "@/components/icons/Icons";
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
@@ -27,13 +28,13 @@ export function SidebarNavigationModeToggle({
|
||||
const modes = [
|
||||
{
|
||||
value: SIDEBAR_NAVIGATION_MODE.BROWSE,
|
||||
label: "Browse",
|
||||
label: "Home",
|
||||
icon: LayoutDashboard,
|
||||
},
|
||||
{
|
||||
value: SIDEBAR_NAVIGATION_MODE.CHAT,
|
||||
label: "Chat",
|
||||
icon: Bot,
|
||||
icon: LighthouseIcon,
|
||||
},
|
||||
] as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user