fix: nav buttons now navigate, not just toggle store state

The [S] button only called setDM(false) without navigating away from
/chat area. Since the notes-to-self feature now calls navigate('/dm/:id'),
the URL stayed at /dm/... and ChatArea never re-mounted.

[S] now navigates to /, [@] navigates to /dm.
This commit is contained in:
2026-07-02 08:49:47 -04:00
parent 5cc9d76394
commit 74a1db8392
+2 -1
View File
@@ -120,7 +120,7 @@ export function Layout() {
<div className="flex-1 flex min-h-0">
<div className="flex flex-col items-center w-16 bg-gb-bg-h border-r border-gb-bg-t py-2 gap-2 shrink-0">
<button
onClick={() => setDM(false)}
onClick={() => { setDM(false); navigate('/'); }}
className={`w-11 h-11 flex items-center justify-center font-mono text-xs border rounded ${
!isDM
? 'bg-gb-bg-t text-gb-orange border-gb-orange'
@@ -134,6 +134,7 @@ export function Layout() {
onClick={() => {
setDM(true);
setActiveServer(null);
navigate('/dm');
}}
className={`w-11 h-11 flex items-center justify-center font-mono text-xs border rounded ${
isDM