Only render search message if nothing is found

This commit is contained in:
Lei Nelissen
2022-01-02 17:21:02 +01:00
parent d2fb4a4aea
commit c28c1a851d

View File

@@ -265,11 +265,11 @@ export default function Search() {
// ListFooterComponent={FooterComponent} // ListFooterComponent={FooterComponent}
extraData={[searchTerm, albums]} extraData={[searchTerm, albums]}
/> />
<FullSizeContainer> {(searchTerm.length && !jellyfinResults.length && !fuseResults.length && !isLoading) ? (
{(searchTerm.length && !jellyfinResults.length && !fuseResults.length && !isLoading) <FullSizeContainer>
? <Text style={{ textAlign: 'center', opacity: 0.5, fontSize: 18 }}>{t('no-results')}</Text> <Text style={{ textAlign: 'center', opacity: 0.5, fontSize: 18 }}>{t('no-results')}</Text>
: null} </FullSizeContainer>
</FullSizeContainer> ) : null}
</> </>
); );
} }