Removed all Example variables, added credential fail handler
This commit is contained in:
parent
cd3c81cf5c
commit
6b715682f9
7 changed files with 82 additions and 89 deletions
19
view/App.tsx
19
view/App.tsx
|
|
@ -34,13 +34,18 @@ class App extends React.Component<any,any> {
|
|||
.then(res => res.json())
|
||||
.then(
|
||||
result => {
|
||||
console.log(result)
|
||||
console.log("data reloaded")
|
||||
this.setState({
|
||||
isLoaded: true,
|
||||
user_data: result,
|
||||
todos: result.tasks.todos
|
||||
})
|
||||
if(result.success === false){
|
||||
this.sendNotice("Login Failed, Please check credentials and try again!")
|
||||
console.log(result)
|
||||
} else {
|
||||
console.log(result)
|
||||
console.log("data reloaded")
|
||||
this.setState({
|
||||
isLoaded: true,
|
||||
user_data: result,
|
||||
todos: result.tasks.todos
|
||||
})
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
this.setState({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue