Add username to local storage and retrieve it in YourProjectsPage
This commit is contained in:
parent
3c8b7f9da2
commit
68b25350ef
2 changed files with 4 additions and 3 deletions
|
|
@ -25,6 +25,7 @@ function LoginCheck(props: {
|
|||
if (response.data !== undefined) {
|
||||
const token = response.data;
|
||||
localStorage.setItem("accessToken", token);
|
||||
localStorage.setItem("username", props.username);
|
||||
//TODO: change so that it checks for user type (admin, user, pm) instead
|
||||
if (token !== "" && props.username === "admin") {
|
||||
props.setAuthority((prevAuth) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue