-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fetching is working out! visualization is now available
- Loading branch information
1 parent
a53821a
commit 3638e41
Showing
4 changed files
with
32 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,7 +77,6 @@ export default function DEVICES() { | |
) | ||
} | ||
</div> | ||
) | ||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,8 @@ import { navigate } from './actions'; | |
const LOGIN = () => { | ||
const pathname = usePathname() | ||
const [credentials, setCredentials] = useState({ | ||
email: '[email protected]', | ||
password: 'XWC3I5vbA#hCJ0f' | ||
email: '', | ||
password: '' | ||
}) | ||
const [loginError, setLoginError] = useState<string>('') | ||
|
||
|
@@ -27,8 +27,11 @@ const LOGIN = () => { | |
'accept': '*/*', | ||
} | ||
}); | ||
localStorage.setItem('token', response.data.token); | ||
api.defaults.headers.Authorization = `Bearer ${response.data.token}`; | ||
const data = JSON.parse(response.data); | ||
const token = data.Authorization.split(' ')[1]; // Para separar só o token de `Bearer {token}` | ||
localStorage.setItem('token', token); | ||
api.defaults.headers.Authorization = token; | ||
//api.defaults.headers.Authorization = `${data.Authorization}`; | ||
|
||
navigate('/home'); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters