diff --git a/src/main/frontend/src/components/AddCountryForm.js b/src/main/frontend/src/components/AddCountryForm.js new file mode 100644 index 0000000000..bcfdedc732 --- /dev/null +++ b/src/main/frontend/src/components/AddCountryForm.js @@ -0,0 +1,89 @@ +class AddCountryForm extends React.Component { + + constructor(props) { + super(props); + this.state = { + nameInEnglish: "", + nameInRussian: "" + }; + this.handleSubmit = this.handleSubmit.bind(this); + this.handleChange = this.handleChange.bind(this); + } + + handleChange(event) { + event.preventDefault(); + this.setState({ + [event.target.name]: event.target.value + }); + } + + handleSubmit(event) { + event.preventDefault(); + + this.setState({}); + + axios.post( + "categories",{},{} + ).then(response => { + + }).catch(error => { + + }); + + } + + render() { + return ( +
+ + + +