create dashboard#1831
Conversation
Tendeeer
commented
Jun 15, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because one core requirement from the task description is not met: people must be imported from people.json, but in src/scripts/main.js you have hardcoded the full people array instead. Functionally, your table rendering is correct: you create a row per person, generate the 6 required cells (name, gender, born, died, age, century), compute age as died - born, and compute century with Math.ceil(person.died / 100), and append rows to the .dashboard table. However, using a hardcoded array breaks the requirement to rely on the provided JSON data source and specifically violates [CHECKLIST ITEM #8], which is treated as a core task constraint, not just a style preference.
The critical issue that must be fixed:
- In
src/scripts/main.js, remove the inlineconst people = [...]definition (the big hardcoded array) and instead use thepeoplevalue imported frompeople.jsonat the top of the file. The rest of your DOM logic can remain the same, just iterate over the importedpeoplerather than the local constant.
Minor/non-blocking note:
- If you want to debug, you can temporarily add
console.log(people)to verify that the import works, then remove it afterward to keep the script clean [CHECKLIST ITEM #9].
Once you switch to using the imported JSON data, your solution will both satisfy the functional requirements and align with the project structure; your current logic is solid, so this is mainly about wiring it up to the correct data source.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there are still two critical requirement violations in src/scripts/main.js. First, instead of using the people array that is imported from people.json (as specified in the task), the file still declares a separate const people = [...] with the full dataset; this duplicates data and ignores the required import, so that entire local array definition needs to be removed and replaced by the already-imported people variable. Second, the console.log(people) call that was allowed only for temporary debugging is still present and should be removed in the final solution to keep the script clean and aligned with the checklist.
To fix this:
- Delete the inline
const people = [...]declaration and rely solely on the importedpeople(typically defined at the very top ofmain.js). - Remove the
console.log(people)statement once you’ve verified everything works.
Your table-building logic (looping over people, creating one row per person, generating all six cells, and correctly computing age and century) is solid, so once these two issues are addressed, your solution will fully meet the task requirements. Keep going—you’re very close to a complete and correct implementation.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| @@ -357,4 +357,20 @@ const people = [ | |||
| // eslint-disable-next-line no-console | |||
| console.log(people); // you can remove it | |||
There was a problem hiding this comment.
The console.log(people) was suggested only for temporary debugging; per the checklist it should be removed in the final solution to keep the script clean.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Your solution is approved because it now fully matches the task requirements for generating the table from the imported people data. You correctly use the people array from people.json, iterate over it, and for each person create a <tr> with 6 <td> cells in the exact order: name, gender, born, died, age, and century. The age calculation as person.died - person.born and the century calculation using Math.ceil(person.died / 100) are both accurate and align with the checklist expectations (e.g., [CHECKLIST ITEM #3] and [CHECKLIST ITEM #4]). The rows are properly appended to the table with the .dashboard class, and you avoided any unnecessary changes to HTML or styles, keeping the solution focused and clean.
One small optional improvement would be to avoid extra indentation or whitespace inside your <td> contents to keep the rendered text as clean as possible, but this is purely cosmetic and does not affect correctness. Overall, this is a solid implementation that shows good attention to the requirements and a clear, readable structure in your JavaScript code. Nice work tightening your solution to use the imported data correctly and removing the earlier temporary debugging code.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨