Bug Description
The SearchForm component sets isLoading to true when the user submits a search, but never resets it to false after navigation completes.
Location
frontend/app/components/SearchForm.tsx (lines 17-19)
Current Behavior
const handleSearch = (e: React.FormEvent) => {
e.preventDefault();
if (!query.trim()) return;
setIsLoading(true); // Set to true
router.push(`/search?q=${encodeURIComponent(query.trim())}`);
// Never set back to false!
};
Expected Behavior
The loading spinner should not persist forever. Since navigation happens immediately via router.push(), the isLoading state is unnecessary OR should be reset after navigation.
Suggested Fix
Either:
- Remove the
isLoading state entirely (since navigation is immediate)
- Or use
useEffect to reset the state after route change
Impact
- Loading spinner shows forever after search
- Search button remains disabled after navigation
- Poor user experience
Labels
bug, frontend, good first issue
Bug Description
The
SearchFormcomponent setsisLoadingtotruewhen the user submits a search, but never resets it tofalseafter navigation completes.Location
frontend/app/components/SearchForm.tsx(lines 17-19)Current Behavior
Expected Behavior
The loading spinner should not persist forever. Since navigation happens immediately via
router.push(), theisLoadingstate is unnecessary OR should be reset after navigation.Suggested Fix
Either:
isLoadingstate entirely (since navigation is immediate)useEffectto reset the state after route changeImpact
Labels
bug, frontend, good first issue