Skip to content
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

DRY, KISS and YAGNI #6

Open
Santiago220991 opened this issue May 2, 2022 · 0 comments
Open

DRY, KISS and YAGNI #6

Santiago220991 opened this issue May 2, 2022 · 0 comments

Comments

@Santiago220991
Copy link
Owner

Santiago220991 commented May 2, 2022

I consider you can implement the next suggestions in order to improve your project.

  • Kindly please don't repeat this section of code to make your code DRY. You can save this section of code in a variable to avoid repeating the code.

To-Do-List/src/index.js

Lines 72 to 79 in 57fab74

taskcontainer.innerHTML += `<div class="tasks-item" id="${element.index}">
<div class="tasks-item-start"><input type="checkbox" class="checkboxicon">
<p>${element.description}</p>
<input class="edit_text" type="text" placeholder="Edit Task">
</div>
<img class="edit_icon" src="${editincon}" alt="edit icon">
<img class="removeicon" src="${deleteicon}" alt="remove icon">
</div>`;

To-Do-List/src/index.js

Lines 81 to 88 in 57fab74

taskcontainer.innerHTML += `<div class="tasks-item" id="${element.index}">
<div class="tasks-item-start"><input type="checkbox" class="checkboxicon" checked>
<p>${element.description}</p>
<input class="edit_text" type="text" placeholder="Edit Task">
</div>
<img class="edit_icon" src="${editincon}" alt="edit icon">
<img class="removeicon" src="${deleteicon}" alt="remove icon">
</div>`;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant