diff --git a/apps/nextjs/src/components/layout/header/header-logo.tsx b/apps/nextjs/src/components/layout/header/header-logo.tsx index ecc439e4f..bb0da24ef 100644 --- a/apps/nextjs/src/components/layout/header/header-logo.tsx +++ b/apps/nextjs/src/components/layout/header/header-logo.tsx @@ -1,6 +1,7 @@ import type { ReactNode } from "react"; import { UnstyledButton } from "@mantine/core"; +import { useOptionalBoard } from "@homarr/boards/context"; import { Link } from "@homarr/ui"; import classes from "./header-logo.module.css"; @@ -13,11 +14,15 @@ interface HeaderLogoProps { } export const HeaderLogo = ({ display, logo, logoWithTitle, label }: HeaderLogoProps) => { + const board = useOptionalBoard(); + let href = "/"; + if (board) href = `/boards/${encodeURIComponent(board.name)}`; + let content = logo; if (display === "logoAndText") content = logoWithTitle; return ( - + {content} );