Fix empty locale picker on listview (#9906)

This commit is contained in:
Marvin Frachet 2021-03-31 10:22:08 +02:00 committed by GitHub
parent 4a020c79ac
commit f9a263ea95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,9 @@ const LocalePicker = () => {
onToggle(); onToggle();
}; };
return ( const hasMultipleLocales = locales.length > 1;
return hasMultipleLocales ? (
<Padded left right> <Padded left right>
<List> <List>
{locales.map(locale => { {locales.map(locale => {
@ -102,7 +104,7 @@ const LocalePicker = () => {
})} })}
</List> </List>
</Padded> </Padded>
); ) : null;
}} }}
/> />
); );