Develop#1557
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it correctly implements the required promise behavior and DOM updates. In src/scripts/main.js, you create promise1 and promise2, resolve promise1 when the .logo element is clicked, and reject promise2 after 3000 ms via setTimeout, which matches the functional requirements. The then handler for promise1 and the catch handler for promise2 both append the required <div class="message"> and <div class="message error-message"> elements with the correct texts to document.body, so the visible behavior is as specified. Your SCSS definitions for .logo, .message, and .error-message align with the elements used in the JavaScript and do not introduce any functional issues.
There are no critical, blocking problems in the implementation; remaining points are minor, such as commented-out alternative code in main.js and slightly rigid positioning for .error-message, which you may refine later for cleanliness and responsiveness. Make sure outside the code that you’ve updated the demo link with your GitHub username and run the required npm test commands, since those checklist items are process-related and still important. Overall, you met the core requirements well—nice work.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
https://github.com/PAVLO111/js_promise_basic_DOM