import React, {Component} from 'react'; import {BrowserRouter as Router, Route} from 'react-router-dom'; import Login from '../login/login'; import 'semantic-ui-css/semantic.min.css'; import HeaderComp from '../template/header'; import './App.css'; import UserLogin from "../../repository/login_repo"; class App extends Component{ constructor(props) { super(props); this.state = { id: null, email: null, name: null, type: null } } render(){ return(
}/>
); } attemptLogin = (username, password, type) => { UserLogin.login(username, password, type).then((res) =>{ console.log(res.data); this.setState({ id: res.data.id, email: res.data.email, name: res.data.name, type: res.data.type }); }); } } export default App;