added implementatio to retrieve URL query
This commit is contained in:
parent
dab9719311
commit
a3e8555e49
3 changed files with 11 additions and 2 deletions
|
@ -6,6 +6,7 @@ import Signup from "./views/Signup";
|
|||
import Login from "./views/Login";
|
||||
import ForgotPass from "./views/Forgot-password";
|
||||
import ChangePass from "./views/Forgot-pass-reset";
|
||||
import queryString from 'query-string';
|
||||
|
||||
import { call } from './client_server';
|
||||
|
||||
|
@ -31,6 +32,13 @@ class App extends React.Component {
|
|||
this.logout = this.logout.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const values = queryString.parse(this.props.location.search);
|
||||
this.setState({
|
||||
query : values
|
||||
});
|
||||
}
|
||||
|
||||
auth(data) {
|
||||
return call.login(data.params)
|
||||
.then(res => {
|
||||
|
|
|
@ -17,7 +17,7 @@ export var call = {
|
|||
return res;
|
||||
}).catch(err => {
|
||||
//console.error(err);
|
||||
return {status : "Errore"};
|
||||
return err;
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import React, {Component} from 'react';
|
||||
import {Button, Form, Grid, Header, Image, Message, Icon, Checkbox, Input} from 'semantic-ui-react';
|
||||
|
||||
|
||||
export default class Login extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
Loading…
Reference in a new issue