- Timestamp:
- 09/17/22 01:24:24 (2 years ago)
- Branches:
- master
- Children:
- 5201690
- Parents:
- 775e15e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
phonelux-frontend/src/components/LoginRegisterComponents/LoginFormComponent.js
r775e15e r7e88e46 6 6 import { Link } from 'react-router-dom'; 7 7 import axios from 'axios'; 8 9 10 8 11 9 export class LoginFormComponent extends Component { … … 44 42 axios(config) 45 43 .then((response) => { 44 const {access_token} = response.data 46 45 // store access token in local storage, redirect to homepage 47 console.log(response.data) 46 localStorage.setItem('token', access_token) 47 window.location.href="/" 48 48 }) 49 49 .catch((error) => { … … 64 64 65 65 render() { 66 67 const {email,password} = this.state68 66 69 67 return ( … … 108 106 } 109 107 108 110 109 export default LoginFormComponent
Note:
See TracChangeset
for help on using the changeset viewer.