Ignore:
Timestamp:
09/17/22 01:24:24 (2 years ago)
Author:
Marko <Marko@…>
Branches:
master
Children:
5201690
Parents:
775e15e
Message:

Added more components

File:
1 edited

Legend:

Unmodified
Added
Removed
  • phonelux-frontend/src/components/LoginRegisterComponents/LoginFormComponent.js

    r775e15e r7e88e46  
    66import { Link } from 'react-router-dom';
    77import axios from 'axios';
    8 
    9 
    108
    119export class LoginFormComponent extends Component {
     
    4442      axios(config)
    4543      .then((response) => {
     44        const {access_token} = response.data
    4645       // store access token in local storage, redirect to homepage
    47        console.log(response.data)
     46      localStorage.setItem('token', access_token)
     47      window.location.href="/"
    4848      })
    4949      .catch((error) => {
     
    6464
    6565render() {
    66 
    67   const {email,password} = this.state
    6866
    6967  return (
     
    108106}
    109107
     108
    110109export default LoginFormComponent
Note: See TracChangeset for help on using the changeset viewer.