mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-09 16:27:45 +08:00
Fix display issue of badges when Sonarr or Radarr is disabled
This commit is contained in:
parent
e77cb153f1
commit
01b76983a7
1 changed files with 6 additions and 6 deletions
|
@ -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…
Reference in a new issue