fix: whitespace search guard and unknown section fallback

- SettingsTab: use searchQuery.trim() instead of searchQuery to prevent
  whitespace-only input from triggering empty search results view
- AdminSettings: fallback to branding when activeSection is unknown
  instead of rendering blank content area
This commit is contained in:
Fringg
2026-03-29 03:08:02 +03:00
parent 28ef6c97f5
commit 67055d58f7
2 changed files with 3 additions and 1 deletions

View File

@@ -44,7 +44,7 @@ export function SettingsTab({
});
// Search mode: flat list of filtered results
if (searchQuery) {
if (searchQuery.trim()) {
if (filteredSettings.length === 0) {
return (
<div className="rounded-xl border border-dark-700/30 bg-dark-800/30 p-12 text-center">

View File

@@ -216,6 +216,8 @@ export default function AdminSettings() {
/>
);
}
// Unknown section — fallback to branding
setActiveSection('branding');
return null;
}
};