Skip to content

Commit

Permalink
[Task] #77, removed outdated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Type-Style committed Jul 2, 2024
1 parent 369e654 commit e57e9ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/client/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ function loginDefault() {
console.error("Unable to parse JWT Data, for login default state");
return false;
}
}
}
return false;
}

const router = createBrowserRouter([
Expand Down
4 changes: 2 additions & 2 deletions src/client/pages/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function Login() {
const [isLoading, setLoading] = React.useState(false);
const [errorObj, setMessageObj] = React.useState({ isError: null, status: null, message: null });

const isFormValid = formInfo.user.value && !formInfo.user.isError && formInfo.password.value && !formInfo.password.isError; // TODO check token and tests && formInfo.token;
const isFormValid = formInfo.user.value && !formInfo.user.isError && formInfo.password.value && !formInfo.password.isError;

function updateField(name: string, value: string) {
const hasError = validateField(name, value, false);
Expand Down Expand Up @@ -79,7 +79,7 @@ function Login() {
headers: { "content-type": "application/x-www-form-urlencoded" }
})
const token = response.data.token;
sessionStorage.setItem("jwt", token); // TODO check expire date
sessionStorage.setItem("jwt", token);
setLogin(true);
setTimeout(() => { navigate("/") }, 300);

Expand Down

0 comments on commit e57e9ba

Please sign in to comment.