diff --git a/frontend/.prettierrc b/frontend/.prettierrc similarity index 100% rename from frontend/.prettierrc rename to frontend/.prettierrc diff --git a/frontend/app/search/page.tsx b/frontend/app/search/page.tsx index c602b96..9b86c32 100644 --- a/frontend/app/search/page.tsx +++ b/frontend/app/search/page.tsx @@ -14,6 +14,7 @@ import { SelectValue, } from "@/components/ui/select"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Alert, AlertDescription } from "@/components/ui/alert"; import { Badge } from "@/components/ui/badge"; import { Collapsible, @@ -63,10 +64,12 @@ export default function BiomodelSearchPage() { const [results, setResults] = useState([]); const [isLoading, setIsLoading] = useState(false); + const [error, setError] = useState(null); const [isAdvancedSearchOpen, setIsAdvancedSearchOpen] = useState(false); const handleSearch = async () => { setIsLoading(true); + setError(null); try { // Build query params from filters, omitting empty bmName const params = new URLSearchParams(); @@ -103,6 +106,7 @@ export default function BiomodelSearchPage() { ); setResults(mappedResults); } catch (err) { + setError("Failed to search biomodels. Please try again."); setResults([]); } finally { setIsLoading(false); @@ -382,6 +386,12 @@ export default function BiomodelSearchPage() { + {error && ( + + {error} + + )} + {/* Results Section */} {results.length > 0 && (
diff --git a/frontend/app/signin/page.tsx b/frontend/app/signin/page.tsx index 6cbe97e..7418efd 100644 --- a/frontend/app/signin/page.tsx +++ b/frontend/app/signin/page.tsx @@ -116,6 +116,7 @@ export default function SignInPage() { type="button" onClick={() => setShowPassword(!showPassword)} className="absolute right-3 top-3 text-gray-400 hover:text-gray-600" + aria-label={showPassword ? "Hide password" : "Show password"} > {showPassword ? ( diff --git a/frontend/app/signup/page.tsx b/frontend/app/signup/page.tsx index d32b8ca..e2d86a0 100644 --- a/frontend/app/signup/page.tsx +++ b/frontend/app/signup/page.tsx @@ -198,6 +198,7 @@ export default function SignUpPage() { type="button" onClick={() => setShowPassword(!showPassword)} className="absolute right-3 top-3 text-gray-400 hover:text-gray-600" + aria-label={showPassword ? "Hide password" : "Show password"} > {showPassword ? ( @@ -230,6 +231,7 @@ export default function SignUpPage() { type="button" onClick={() => setShowConfirmPassword(!showConfirmPassword)} className="absolute right-3 top-3 text-gray-400 hover:text-gray-600" + aria-label={showConfirmPassword ? "Hide password" : "Show password"} > {showConfirmPassword ? (