import { useTranslation } from 'react-i18next' import { FormGroup, FormHelperText, TextField } from '@material-ui/core' import { SecondarySettingsContent, SettingSectionLabel } from './style' export default function TMDBSettings({ settings, updateSettings }) { const { t } = useTranslation() const { TMDBSettings } = settings || {} const { APIKey = '', APIURL = 'https://api.themoviedb.org/3', ImageURL = 'https://image.tmdb.org', ImageURLRu = 'https://imagetmdb.com', } = TMDBSettings || {} const handleChange = (field, value) => { updateSettings({ TMDBSettings: { ...TMDBSettings, [field]: value, }, }) } return ( {t('TMDB.Settings')} handleChange('APIKey', e.target.value)} placeholder='Enter your TMDB API key' variant='outlined' size='small' fullWidth style={{ marginBottom: 15 }} /> {t('TMDB.APIKeyHint')} handleChange('APIURL', e.target.value)} placeholder='https://api.themoviedb.org/3' variant='outlined' size='small' fullWidth style={{ marginBottom: 10 }} /> {t('TMDB.APIURLHint')} handleChange('ImageURL', e.target.value)} placeholder='https://image.tmdb.org' variant='outlined' size='small' fullWidth style={{ marginBottom: 10 }} /> {t('TMDB.ImageURLHint')} handleChange('ImageURLRu', e.target.value)} placeholder='https://imagetmdb.com' variant='outlined' size='small' fullWidth style={{ marginBottom: 10 }} /> {t('TMDB.ImageURLRuHint')}
) }