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