Revert change in PokeSearch.kt
This commit is contained in:
parent
a77acd56c7
commit
7b3131d510
@ -42,16 +42,14 @@ fun PokeSearch(pokeSearchViewModel: PokeSearchViewModel) {
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
if (searchResults != null) {
|
||||
if (searchResults!!.isNotEmpty()) {
|
||||
searchResults!!.forEach { pokemon ->
|
||||
searchResults?.let { results ->
|
||||
if (results.isNotEmpty()) {
|
||||
results.forEach { pokemon ->
|
||||
Text(text = pokemon.name)
|
||||
}
|
||||
} else {
|
||||
Text("No results found")
|
||||
}
|
||||
} else {
|
||||
Text("Enter a pokemon name to search")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user