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}
extraData={[searchTerm, albums]}
/>
<FullSizeContainer>
{(searchTerm.length && !jellyfinResults.length && !fuseResults.length && !isLoading)
? <Text style={{ textAlign: 'center', opacity: 0.5, fontSize: 18 }}>{t('no-results')}</Text>
: null}
</FullSizeContainer>
{(searchTerm.length && !jellyfinResults.length && !fuseResults.length && !isLoading) ? (
<FullSizeContainer>
<Text style={{ textAlign: 'center', opacity: 0.5, fontSize: 18 }}>{t('no-results')}</Text>
</FullSizeContainer>
) : null}
</>
);
}