Skip to content

Commit 24e2854

Browse files
cgiovandoclaude
andcommitted
chore(frontend): drop the no-op logo link override, record why
hot-header hardcodes the logo anchor to "/" in its own template; neither the top-link-href attribute nor the property changes it. Verified both are set on the element while the rendered anchor still reads "/". Removing the override that did nothing and leaving a note, since this needs fixing in @hotosm/ui. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 44dd891 commit 24e2854

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎frontend/src/SiteHeader.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ export default function SiteHeader() {
5757
// The logo's link defaults to "/" inside the component, which leaves the
5858
// app when it is served from a subdirectory. Like `tabs`, this is a JS
5959
// property rather than an observed attribute.
60-
// `top-link-href` is an observed attribute, and the component renders the
61-
// logo link from the attribute rather than the property, so setting the
62-
// property alone leaves the logo pointing at the server root.
63-
headerRef.current.setAttribute("top-link-href", appUrl("/"));
60+
// NOTE: the logo's own link is hardcoded to "/" inside @hotosm/ui's
61+
// hot-header. Setting `top-link-href`, as either attribute or property,
62+
// does not change it, so clicking the logo leaves the app when it is
63+
// served from a subdirectory. Harmless in production, where "/" is the
64+
// app root. Needs fixing upstream in the component.
6465
}
6566
}, []);
6667

0 commit comments

Comments
 (0)