import React from "react"; import {Form, Col, Button} from "react-bootstrap"; import style from "./GeneralSettings.module.css" class GeneralSettings extends React.Component { constructor(props) { super(props); this.state = { passwordsupport: false, videopath: "", tvshowpath: "", mediacentername: "", password: "" }; } componentDidMount() { const updateRequest = new FormData(); updateRequest.append('action', 'loadGeneralSettings'); fetch('/api/Settings.php', {method: 'POST', body: updateRequest}) .then((response) => response.json() .then((result) => { this.setState({ videopath: result.video_path, tvshowpath: result.episode_path, mediacentername: result.mediacenter_name, password: result.password, passwordsupport: result.passwordEnabled }); })); } render() { return ( <>