Skip to content

Commit

Permalink
Внес правки наставника
Browse files Browse the repository at this point in the history
  • Loading branch information
generalofgotei committed Dec 9, 2024
1 parent 4228fea commit 651b105
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 5 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import {
generateArrObj
} from './data.js';

import {
renderGallery
} from './thumbnails.js';

renderGallery();
renderGallery(generateArrObj());
7 changes: 1 addition & 6 deletions js/thumbnails.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import {
generateArrObj
} from './data.js';

const renderGallery = () => {
const renderGallery = (userPictures) => {
const picturesContainer = document.querySelector('.pictures');
const pictureTemplate = document.querySelector('#picture')
.content
.querySelector('a');

const userPictures = generateArrObj();
const pictureFragment = document.createDocumentFragment();

userPictures.forEach(({id, url, description, likes, comments}) => {
Expand Down

0 comments on commit 651b105

Please sign in to comment.