Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(SearchBar):no-results-added

Aswin Asokd22b1d286343
diff --git a/web/packages/new/photos/components/SearchBar.tsx b/web/packages/new/photos/components/SearchBar.tsx
index 68dfbba4e2..70fbe3fd56 100644
--- a/web/packages/new/photos/components/SearchBar.tsx
+++ b/web/packages/new/photos/components/SearchBar.tsx
@@ -289,12 +289,16 @@ const SearchInput: React.FC<Omit<SearchBarProps, "onShowSearchInput">> = ({
onBlur={handleBlur}
placeholder={t("search_hint")}
noOptionsMessage={({ inputValue }) =>
- shouldShowEmptyState(inputValue) ? (
- <EmptyState
- onSelectPeople={handleSelectPeople}
- onSelectPerson={handleSelectPerson}
- />
- ) : null
+ inputValue
+ ? t("no_results")
+ : shouldShowEmptyState(inputValue)
+ ? (
+ <EmptyState
+ onSelectPeople={handleSelectPeople}
+ onSelectPerson={handleSelectPerson}
+ />
+ )
+ : null
}
/>