import React, { Component } from 'react' import profileIcon from "../../images/profileicon.png"; import "./RegisterFormComponent.css" import ErrorIcon from '@mui/icons-material/Error'; import CheckBoxIcon from '@mui/icons-material/CheckBox'; import InputFormComponent from './InputFormComponent'; import { Input } from '@mui/material'; import axios from 'axios'; export class RegisterFormComponent extends Component { constructor(props) { super(props) this.state = { firstName: '', lastName: '', email: '', password: '', confirmPassword:'', } } submitHandler = (e) => { e.preventDefault() let dataToSend = JSON.stringify({ "firstName": this.state.firstName, "lastName": this.state.lastName, "email": this.state.email, "password": this.state.password }); let config = { method: 'post', url: '/registration', headers: { 'Content-Type': 'application/json' }, data : dataToSend }; axios(config) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); }); } setValue = (e) => { this.setState({ [e.target.name]: e.target.value }) } render() { const {firstName,lastName,email,password,confirmPassword} = this.state return (
profile

Регистрација

); } } export default RegisterFormComponent