Skip to content

Commit

Permalink
usequery cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
achowdhry-ripple committed Nov 6, 2024
1 parent e58436e commit fa439f6
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,14 @@ const SearchResults = ({
(accountLines) => accountLines.lines[0]?.limit ?? 0.0,
)

const fetchTokens = async () => {
const fetchTokens = () => {
if (currentSearchValue === '') {
return [] // Return an empty list if search is cleared
}

const response = await axios.get(
`/api/v1/tokens/search/${currentSearchValue}`,
)
return response.data.tokens
return axios
.get(`/api/v1/tokens/search/${currentSearchValue}`)
.then((response) => response.data.tokens)
}

const onLinkClick = () => {
Expand Down

0 comments on commit fa439f6

Please sign in to comment.