ZA | 25-ITP-May | Malusi Skunyana | Sprint 3 | To-do List#762
Closed
MalusiS wants to merge 3 commits intoCodeYourFuture:mainfrom
Closed
ZA | 25-ITP-May | Malusi Skunyana | Sprint 3 | To-do List#762MalusiS wants to merge 3 commits intoCodeYourFuture:mainfrom
MalusiS wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
sambabib
reviewed
Aug 14, 2025
| const diffTime = deadline - today; | ||
| const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24)); | ||
|
|
||
| if (diffDays > 1) return { text: `${diffDays} days left`, status: "normal" }; |
There was a problem hiding this comment.
good solution overall. one thing to make a habit of going forward is to store things like statuses in variables, sometimes an object containing your statuses is ideal since javascript does not exactly support enums. this would help you keep track of things as your project grows.
Author
There was a problem hiding this comment.
Thank you, I really appreciate the feedback.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
This pull request implements a fully functional Todo-List web app with support for adding, completing, and deleting todos. Initial todos are dynamically rendered, and each todo includes icons for toggling completion and deleting. Users can add new todos via a text input, optionally set a deadline using a date picker, and remove all completed todos with a dedicated button. Todos with deadlines display a countdown, with visual cues: red for overdue, orange for due today, and gray for future dates. The app includes clean, responsive styling, and all provided Jest tests for mandatory and advanced functionality pass successfully.
Questions
Ask any questions you have for your reviewer.