diff --git a/src/NoResultsScreen.tsx b/src/NoResultsScreen.tsx index 01f73cb7..1fa839b6 100644 --- a/src/NoResultsScreen.tsx +++ b/src/NoResultsScreen.tsx @@ -18,17 +18,18 @@ interface NoResultsScreenProps } export function NoResultsScreen(props: NoResultsScreenProps) { + const searchSuggestions: string[] = props.state.context.searchSuggestions; + return (

No results for "{props.state.query}".

-

- Try searching for{' '} - {(props.state.context.searchSuggestions as string[]) - .slice(0, 3) - .reduce( + {searchSuggestions.length > 0 && ( +

+ Try searching for{' '} + {searchSuggestions.slice(0, 3).reduce( (acc, search) => [ ...acc, acc.length > 0 ? ', ' : '', @@ -46,8 +47,9 @@ export function NoResultsScreen(props: NoResultsScreenProps) { ], [] )} -  ... -

+  ... +

+ )}

If you believe this query should return results,