fix: clicking Applications header navigates back to all apps
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m31s
CI / docker (push) Successful in 1m22s
CI / deploy (push) Failing after 2m26s
CI / deploy-feature (push) Has been skipped

When the Applications section is already expanded, clicking the
header now navigates to /{tab} (all applications) instead of
collapsing. When collapsed, clicking expands as before.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-03 10:49:54 +02:00
parent 2bc3efad7f
commit c16f0e62ed

View File

@@ -327,11 +327,14 @@ function LayoutContent() {
navigate('/exchanges');
return;
}
setAppsOpen((prev) => {
writeCollapsed(SK_APPS, !prev);
return !prev;
});
}, [isAdminPage, navigate]);
if (appsOpen) {
// Already open — navigate to all applications
navigate(`/${scope.tab}`);
} else {
setAppsOpen(true);
writeCollapsed(SK_APPS, true);
}
}, [isAdminPage, appsOpen, navigate, scope.tab]);
const toggleAdmin = useCallback(() => {
if (!isAdminPage) {