diff --git a/src/js/App.js b/src/js/App.js index 38ca038e..54d8b527 100755 --- a/src/js/App.js +++ b/src/js/App.js @@ -55,6 +55,7 @@ const Content = () => ( } /> } /> } /> + } /> } /> } /> } /> diff --git a/src/js/components/SearchResults.js b/src/js/components/SearchResults.js index a434fed0..91ba997d 100755 --- a/src/js/components/SearchResults.js +++ b/src/js/components/SearchResults.js @@ -38,8 +38,6 @@ const SearchResults = ({ results = results.slice(0, 6); } - if (all && !results.length) return null; - return (

@@ -60,7 +58,7 @@ const SearchResults = ({ )}

- {results.length > 0 && ( + {results.length > 0 ? (
{type === 'artists' && } {type === 'albums' && } @@ -84,6 +82,10 @@ const SearchResults = ({ )}
+ ) : ( + + + )}
); diff --git a/src/js/locale/en.yaml b/src/js/locale/en.yaml index 77eb86ef..214ddef5 100755 --- a/src/js/locale/en.yaml +++ b/src/js/locale/en.yaml @@ -339,6 +339,7 @@ search: sort: Sort source: Sources placeholder: Search + no_results: No results all: title: All artists: diff --git a/src/js/views/Search.js b/src/js/views/Search.js index fceed805..50757b0a 100755 --- a/src/js/views/Search.js +++ b/src/js/views/Search.js @@ -50,7 +50,7 @@ const Search = () => { const updateSearchQuery = (term, providers) => { const encodedTerm = encodeURIComponent(term); - navigate(`/search/${type}/${providers.join(',')}/${encodedTerm || ''}`); + navigate(`/search/${type}/${providers.join(',') || 'none'}/${encodedTerm || ''}`); } const onReset = () => navigate('/search'); @@ -113,13 +113,15 @@ const Search = () => { onReset={onReset} /> -
- {type != 'all' ? ( - - ) : ( - - )} -
+ {term && ( +
+ {type != 'all' ? ( + + ) : ( + + )} +
+ )} ); }