Changeset 580ba1a for client_app/src/components/main
- Timestamp:
- 01/14/21 02:31:15 (4 years ago)
- Branches:
- master
- Children:
- be373a8
- Parents:
- df3a395
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
client_app/src/components/main/App.js
rdf3a395 r580ba1a 17 17 import RegisterCompany from "../register/register_company_form"; 18 18 import RegisterTeam from "../register/register_team_form"; 19 import Search from "../filter/search"; 20 import EditUser from "../account_edit/user_edit"; 21 import EditCompany from "../account_edit/company_edit"; 19 22 20 23 class App extends Component{ … … 30 33 } 31 34 32 render(){35 render(){ 33 36 return( 34 37 <Router> … … 47 50 <Route path={"/register/company"} render={() => <RegisterCompany message={this.setSuccess} />}/> 48 51 <Route path={"/register/team"} render={() => <RegisterTeam message={this.setSuccess}/>}/> 52 <Route path={"/user/search"} render={() => <Search loggedIn={this.state.logged}/>}/> 53 <Route path={"/user/edit"} render={() => <EditUser oldUser={this.state.currentUser} updateUser={this.updateUser} message={this.setSuccess}/>}/> 54 <Route path={"/company/edit"} render={() => <EditCompany oldUser={this.state.currentUser} updateUser={this.updateUser} message={this.setSuccess}/>}/> 49 55 <Route path={"/logout"} render={() => <Redirect to={"/login"}/>}/> 50 56 <Route path={"/"} render={() => <Redirect to={"/login"}/>}/> … … 62 68 } 63 69 70 updateUser = (user) =>{ 71 this.setState({ 72 currentUser: user 73 }) 74 } 75 64 76 setSuccess = (message) => { 65 77 this.setState({ … … 70 82 attemptLogin = (email, password, type) => { 71 83 UserLogin.login(email, password, type).then((res) =>{ 72 console.log(res.data);73 84 if(res.data.email==null){ 74 85 this.setState({
Note:
See TracChangeset
for help on using the changeset viewer.