mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
Bug fix + UI improvment
- Fixes Bug when loading torrent category from cache - UI: Do not display category if not provided
This commit is contained in:
@@ -132,13 +132,17 @@ export const CategoryWidget = ({ data }) => {
|
||||
const { t } = useTranslation()
|
||||
const { iconBGColor, valueBGColor } = useGetWidgetColors('category')
|
||||
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('Category')}
|
||||
value={data}
|
||||
iconBg={iconBGColor}
|
||||
valueBg={valueBGColor}
|
||||
icon={CategoryIcon}
|
||||
/>
|
||||
)
|
||||
if (data) {
|
||||
return (
|
||||
<StatisticsField
|
||||
title={t('Category')}
|
||||
value={data}
|
||||
iconBg={iconBGColor}
|
||||
valueBg={valueBGColor}
|
||||
icon={CategoryIcon}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user