fix(nav): remove toggle behavior on navigation tabs (#417)

Clicking an already-active navigation tab previously toggled back to
the dashboard/editor view. This was a holdover from the old UI where
the tab buttons were different. Under the current design it causes
confusion, so clicking the active tab now does nothing.
This commit is contained in:
Anso
2026-04-07 01:44:28 -04:00
committed by GitHub
parent 88011e1b16
commit 5b06992e05
+2 -5
View File
@@ -249,12 +249,9 @@ export default function EditorLayout() {
setIsEditing(false);
};
// Navigation handler with toggle support
const handleNavigate = (value: string) => {
if (value === activeView) {
// Toggle off: return to editor if a file is open, else dashboard
setActiveView(selectedFile ? 'editor' : 'dashboard');
} else if (value === 'dashboard') {
if (value === activeView) return;
if (value === 'dashboard') {
resetEditorState();
setActiveView('dashboard');
} else {