Fix all ESLint errors so CI passes on every branch
- Move nested components outside parent functions (GraphsTab, ClientDetailPage, NetworkServicesDHCPPage) - Add eslint-disable comments for intentional setState-in-effect patterns (form sync in DNS, NTP, Wireless pages) - Fix unescaped quote entities in JSX (SystemConfigTab, GlobalSearch, TopologyPage) - Fix empty catch block in main.tsx - Convert ternary-as-statement to if/else in RadiosTab - Move Date.now() calls into useMemo in DashboardPage (react-hooks/purity) - Fix DOM mutation in event handler in TerminalModal (react-hooks/immutability) - Wrap ref assignment in useLayoutEffect in useSocket (react-hooks/refs) - Update TypeScript devDependency version pin to match installed version Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
e43b80a9a2
commit
c203011494
@@ -45,6 +45,7 @@ export default function GlobalSearch() {
|
||||
|
||||
// Fetch when debounced query is long enough
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line react-hooks/set-state-in-effect
|
||||
if (debouncedQuery.length < 2) { setResults(null); return; }
|
||||
setLoading(true);
|
||||
searchApi.search(debouncedQuery)
|
||||
@@ -155,7 +156,7 @@ export default function GlobalSearch() {
|
||||
|
||||
{!loading && !hasResults && (
|
||||
<div className="px-4 py-8 text-sm text-center text-gray-400 dark:text-slate-500">
|
||||
No results for <span className="font-medium text-gray-600 dark:text-slate-300">"{query}"</span>
|
||||
No results for <span className="font-medium text-gray-600 dark:text-slate-300">"{query}"</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user