-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completed-All-TASKS!!! #6
base: main
Are you sure you want to change the base?
Completed-All-TASKS!!! #6
Conversation
middlewares/no_auth_required.js
Outdated
export function Authorized(token){ | ||
if (token) { | ||
console.log("Welcome Back!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should have redirected the already logged In user to the index page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I redirected user to homepage now by changing auth_required.js and no_auth_required.js. Please, review now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay in making changes due to endsems.
components/LoginForm.js
Outdated
const { login,API_BASE_URL,setpagetype } = useAuth() | ||
useEffect(()=>{setpagetype("LOGIN");return;},[]) | ||
const loginnow = () => { | ||
const user_name = document.getElementById("inputUsername").value.trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use React Hooks like useState instead of Vanilla JS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated login form. Please. review now.
const addTask = (e) => { | ||
e.preventDefault() | ||
if (!Todotxt || Todotxt=="") { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have added some Error or Warning Toast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added error message in add task. Please, review again.
components/TodoListItem.js
Outdated
* @todo 2. Update the task in the dom. | ||
*/ | ||
if (!Newdata) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning toast missing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added warning toast in update method. Please, review again.
Added error message.
Used react hooks!
Added error message in update method!
Passed functions to no_auth_required.js !
Added function to redirect user to homepage!
Sorry for changes again, now finally added warning message.
CSOC Task 3 Submission
I have completed the following tasks
auth_required.js
andno_auth_required.js