Fix display issue of badges when Sonarr or Radarr is disabled

pull/1386/head
LASER-Yi 4 years ago
parent e77cb153f1
commit 01b76983a7

@ -42,22 +42,22 @@ const Sidebar: FunctionComponent<Props> = ({ open }) => {
const { movies, episodes, providers } = useReduxStore((s) => s.site.badges);
const sonarrEnabled = useIsSonarrEnabled();
const radarrEnabled = useIsRadarrEnabled();
const badges = useMemo<BadgeProvider>(
() => ({
Wanted: {
Series: episodes,
Movies: movies,
Series: sonarrEnabled ? episodes : 0,
Movies: radarrEnabled ? movies : 0,
},
System: {
Providers: providers,
},
}),
[movies, episodes, providers]
[movies, episodes, providers, sonarrEnabled, radarrEnabled]
);
const sonarrEnabled = useIsSonarrEnabled();
const radarrEnabled = useIsRadarrEnabled();
const hiddenKeys = useMemo<string[]>(() => {
const list = [];
if (!sonarrEnabled) {

Loading…
Cancel
Save