diff --git a/src/components/AppShelf/AppShelfMenu.tsx b/src/components/AppShelf/AppShelfMenu.tsx index 5aada187a..78f9b10ad 100644 --- a/src/components/AppShelf/AppShelfMenu.tsx +++ b/src/components/AppShelf/AppShelfMenu.tsx @@ -20,11 +20,7 @@ export default function AppShelfMenu(props: any) { onClose={() => setOpened(false)} title="Modify a service" > - + - getMedias(service, 'sonarr').then((res) => { - currentSonarrMedias.push(...res.data); - }).catch(() => { - currentSonarrMedias.push([]); - }) + getMedias(service, 'sonarr') + .then((res) => { + currentSonarrMedias.push(...res.data); + }) + .catch(() => { + currentSonarrMedias.push([]); + }) ) ).then(() => { setSonarrMedias(currentSonarrMedias); @@ -83,11 +85,13 @@ export default function CalendarComponent(props: any) { const currentRadarrMedias: any[] = []; Promise.all( radarrServices.map((service) => - getMedias(service, 'radarr').then((res) => { - currentRadarrMedias.push(...res.data); - }).catch(() => { - currentRadarrMedias.push([]); - }) + getMedias(service, 'radarr') + .then((res) => { + currentRadarrMedias.push(...res.data); + }) + .catch(() => { + currentRadarrMedias.push([]); + }) ) ).then(() => { setRadarrMedias(currentRadarrMedias); @@ -95,11 +99,13 @@ export default function CalendarComponent(props: any) { const currentLidarrMedias: any[] = []; Promise.all( lidarrServices.map((service) => - getMedias(service, 'lidarr').then((res) => { - currentLidarrMedias.push(...res.data); - }).catch(() => { - currentLidarrMedias.push([]); - }) + getMedias(service, 'lidarr') + .then((res) => { + currentLidarrMedias.push(...res.data); + }) + .catch(() => { + currentLidarrMedias.push([]); + }) ) ).then(() => { setLidarrMedias(currentLidarrMedias); @@ -107,11 +113,13 @@ export default function CalendarComponent(props: any) { const currentReadarrMedias: any[] = []; Promise.all( readarrServices.map((service) => - getMedias(service, 'readarr').then((res) => { - currentReadarrMedias.push(...res.data); - }).catch(() => { - currentReadarrMedias.push([]); - }) + getMedias(service, 'readarr') + .then((res) => { + currentReadarrMedias.push(...res.data); + }) + .catch(() => { + currentReadarrMedias.push([]); + }) ) ).then(() => { setReadarrMedias(currentReadarrMedias); diff --git a/src/components/modules/ping/PingModule.tsx b/src/components/modules/ping/PingModule.tsx index b77d8c2fd..b0c333bfa 100644 --- a/src/components/modules/ping/PingModule.tsx +++ b/src/components/modules/ping/PingModule.tsx @@ -23,19 +23,19 @@ export default function PingComponent(props: any) { const exists = config.modules?.[PingModule.title]?.enabled ?? false; function statusCheck(response: AxiosResponse) { - const { status }: {status: string[]} = props; + const { status }: { status: string[] } = props; //Default Status let acceptableStatus = ['200']; if (status !== undefined && status.length) { acceptableStatus = status; } // Checks if reported status is in acceptable status array - if (acceptableStatus.indexOf((response.status).toString()) >= 0) { + if (acceptableStatus.indexOf(response.status.toString()) >= 0) { setOnline('online'); setResponse(response.status); } else { setOnline('down'); - setResponse(response.status) + setResponse(response.status); } } @@ -59,7 +59,13 @@ export default function PingComponent(props: any) {