mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-01 04:34:50 -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 { t } = useTranslation();
|
||||||
const labelKey =
|
const labelKey =
|
||||||
mediaType !== MediaTypeAll ? `browse.mediatypekey.${mediaType.key}` : "browse.mediatypelabel";
|
mediaType !== MediaTypeAll ? `browse.mediatypekey.${mediaType.key}` : "browse.mediatypelabel";
|
||||||
|
const icon = mediaType !== MediaTypeAll ? mediaType?.icon ?? FilterList : FilterList;
|
||||||
return (
|
return (
|
||||||
<PressableFeedback
|
<PressableFeedback
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...css({ flexDirection: "row", alignItems: "center" }, props as any)}
|
{...css({ flexDirection: "row", alignItems: "center" }, props as any)}
|
||||||
{...tooltip(t("browse.mediatype-tt"))}
|
{...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>
|
<P>{t(labelKey as any)}</P>
|
||||||
</PressableFeedback>
|
</PressableFeedback>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user