mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix icon when no media type selected
This commit is contained in:
parent
654faae847
commit
881188c689
@ -56,13 +56,14 @@ const MediaTypeTrigger = forwardRef<View, PressableProps & { mediaType: MediaTyp
|
||||
const { t } = useTranslation();
|
||||
const labelKey =
|
||||
mediaType !== MediaTypeAll ? `browse.mediatypekey.${mediaType.key}` : "browse.mediatypelabel";
|
||||
const icon = mediaType !== MediaTypeAll ? mediaType?.icon ?? FilterList : FilterList;
|
||||
return (
|
||||
<PressableFeedback
|
||||
ref={ref}
|
||||
{...css({ flexDirection: "row", alignItems: "center" }, props as any)}
|
||||
{...tooltip(t("browse.mediatype-tt"))}
|
||||
>
|
||||
<Icon icon={mediaType?.icon ?? FilterList} {...css({ paddingX: ts(0.5) })} />
|
||||
<Icon icon={icon} {...css({ paddingX: ts(0.5) })} />
|
||||
<P>{t(labelKey as any)}</P>
|
||||
</PressableFeedback>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user