Chore: homepage tests (#6278)

This commit is contained in:
shamoon
2026-02-04 19:58:39 -08:00
committed by GitHub
parent 7d019185a3
commit 872a3600aa
558 changed files with 32606 additions and 84 deletions
+3 -5
View File
@@ -82,12 +82,10 @@ export function getStoredProvider() {
export default function Search({ options }) {
const { t } = useTranslation();
const availableProviderIds = getAvailableProviderIds(options);
const availableProviderIds = getAvailableProviderIds(options) ?? [];
const [query, setQuery] = useState("");
const [selectedProvider, setSelectedProvider] = useState(
searchProviders[availableProviderIds[0] ?? searchProviders.google],
);
const [selectedProvider, setSelectedProvider] = useState(searchProviders[availableProviderIds[0] ?? "google"]);
const [searchSuggestions, setSearchSuggestions] = useState([]);
useEffect(() => {
@@ -153,7 +151,7 @@ export default function Search({ options }) {
}
};
if (!availableProviderIds) {
if (!availableProviderIds.length) {
return null;
}