mirror of
https://github.com/sct/overseerr.git
synced 2025-09-27 04:22:37 +02:00
feat: add overseerr version and update availability status to sidebar
sort of experimental so may be kinda broken. :)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user