Skip to content

Conversation

@Elvira-Nikolenko
Copy link
Contributor

@Elvira-Nikolenko Elvira-Nikolenko commented Nov 19, 2025

@keksobot
Copy link
Contributor

♻️ Я собрал ваш пулреквест. Посмотреть можно здесь.

keksobot pushed a commit that referenced this pull request Nov 19, 2025
Comment on lines +21 to +30
const renderListMiniature = (list) => {
list.forEach((image) => {
fragment.appendChild(renderMiniature(image));
});

const pictureContainer = document.querySelector('.pictures');
if (pictureContainer) {
pictureContainer.appendChild(fragment);
}
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

можно добавить класс и сам фрагмент в параметры, чтобы функцию можно было использовать не только с классом .pictures, так же функция должна все зависимости получать в качестве аргументов и не тянуть их из вне.
= (list, class, fragment) => {
...
const pictureContainer = document.querySelector(class);
}


const miniature = document.querySelector('#picture').content;

const renderMiniature = (dataUser) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miniature нужно прокидывать аргументом

@keksobot keksobot merged commit f359a31 into htmlacademy-javascript:master Nov 23, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants