feat: add overseerr version and update availability status to sidebar

sort of experimental so may be kinda broken. :)
This commit is contained in:
sct
2021-04-13 19:30:55 +09:00
parent a035d60c19
commit ecf13123d2
8 changed files with 341 additions and 27 deletions

View File

@@ -1,6 +1,7 @@
import React from 'react';
import { defineMessages, useIntl } from 'react-intl';
import useSWR from 'swr';
import { StatusResponse } from '../../../server/interfaces/api/settingsInterfaces';
import Modal from '../Common/Modal';
import Transition from '../Transition';
@@ -13,12 +14,9 @@ const messages = defineMessages({
const StatusChecker: React.FC = () => {
const intl = useIntl();
const { data, error } = useSWR<{ version: string; commitTag: string }>(
'/api/v1/status',
{
refreshInterval: 60 * 1000,
}
);
const { data, error } = useSWR<StatusResponse>('/api/v1/status', {
refreshInterval: 60 * 1000,
});
if (!data && !error) {
return null;