import React from 'react'; import useSWR from 'swr'; import LoadingSpinner from '../Common/LoadingSpinner'; import type { MainSettings } from '../../../server/lib/settings'; import CopyButton from './CopyButton'; import { Form, Formik, Field } from 'formik'; import axios from 'axios'; import Button from '../Common/Button'; import { defineMessages, useIntl } from 'react-intl'; const messages = defineMessages({ save: 'Save Changes', saving: 'Saving...', }); const SettingsMain: React.FC = () => { const intl = useIntl(); const { data, error, revalidate } = useSWR( '/api/v1/settings/main' ); if (!data && !error) { return ; } return ( <>

General Settings

These are settings related to general Overseerr configuration.

{ try { await axios.post('/api/v1/settings/main', { applicationUrl: values.applicationUrl, }); } catch (e) { // TODO show error } finally { revalidate(); } }} > {({ errors, touched, isSubmitting }) => { return (
); }}
); }; export default SettingsMain;