fix search when api fails

This commit is contained in:
saml33 2023-01-27 22:45:18 +11:00
parent da3bb18780
commit 150998afc4
6 changed files with 7 additions and 7 deletions

View File

@ -92,7 +92,7 @@ const SearchPage = () => {
</Button>
</div>
<div className="space-y-2 pt-8">
{searchResults.length || showNoResults ? (
{searchResults?.length || showNoResults ? (
<h2 className="mb-4 border-t border-th-bkg-3 pt-4 text-base">
{t('results')}
</h2>
@ -108,7 +108,7 @@ const SearchPage = () => {
<div className="h-20 w-full rounded-md bg-th-bkg-2" />
</SheenLoader>
</>
) : searchResults.length ? (
) : searchResults?.length ? (
searchResults.map((r) =>
isAccountSearch ? (
<MangoAccountItem item={r} type={searchType} />

View File

@ -9,6 +9,6 @@
"search-accounts": "Search Accounts",
"search-by": "Search By",
"search-for": "Search For",
"search-failed": "Failed to search",
"search-failed": "Something went wrong. Try again later",
"wallet-pk": "Wallet Address"
}

View File

@ -9,6 +9,6 @@
"search-accounts": "Search Accounts",
"search-by": "Search By",
"search-for": "Search For",
"search-failed": "Failed to search",
"search-failed": "Something went wrong. Try again later",
"wallet-pk": "Wallet Address"
}

View File

@ -9,6 +9,6 @@
"search-accounts": "Search Accounts",
"search-by": "Search By",
"search-for": "Search For",
"search-failed": "Failed to search",
"search-failed": "Something went wrong. Try again later",
"wallet-pk": "Wallet Address"
}

View File

@ -9,6 +9,6 @@
"search-accounts": "Search Accounts",
"search-by": "Search By",
"search-for": "Search For",
"search-failed": "Failed to search",
"search-failed": "Something went wrong. Try again later",
"wallet-pk": "Wallet Address"
}

View File

@ -9,6 +9,6 @@
"search-accounts": "Search Accounts",
"search-by": "Search By",
"search-for": "Search For",
"search-failed": "Failed to search",
"search-failed": "Something went wrong. Try again later",
"wallet-pk": "Wallet Address"
}