Merge remote-tracking branch 'overseerr/develop' into develop

This commit is contained in:
notfakie
2022-09-01 18:11:15 +12:00
473 changed files with 15548 additions and 8433 deletions

View File

@@ -1,10 +1,11 @@
import { MediaServerType } from '@server/constants/server';
import type { PublicSettingsResponse } from '@server/interfaces/api/settingsInterfaces';
import React from 'react';
import useSWR from 'swr';
import { MediaServerType } from '../../server/constants/server';
import { PublicSettingsResponse } from '../../server/interfaces/api/settingsInterfaces';
export interface SettingsContextProps {
currentSettings: PublicSettingsResponse;
children?: React.ReactNode;
}
const defaultSettings = {
@@ -31,10 +32,10 @@ export const SettingsContext = React.createContext<SettingsContextProps>({
currentSettings: defaultSettings,
});
export const SettingsProvider: React.FC<SettingsContextProps> = ({
export const SettingsProvider = ({
children,
currentSettings,
}) => {
}: SettingsContextProps) => {
const { data, error } = useSWR<PublicSettingsResponse>(
'/api/v1/settings/public',
{ fallbackData: currentSettings }