From d1c88b6821f8d1dc9bb4b6aaad76dd4ea361d396 Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 7 Oct 2026 09:59:43 +0200 Subject: [PATCH] fix: return board header to current dashboard (#7059) Related to #7056. Keep the current board destination when returning from dashboard settings. --- apps/nextjs/src/components/layout/header/header-logo.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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} );