mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-02 23:19:33 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user