Skip to content

Commit

Permalink
add view
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatyana-js committed Jun 14, 2024
1 parent 97ba49e commit e093d2c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default (elements, i18n, state) => {

const renderFeeds = () => {
const feedContainer = document.querySelector('.feeds');
const feedView = renderBlock(t('feedTitle'));
renderBlock(t('feedTitle'));
const lists = document.createElement('ul');
lists.classList.add('list-group', 'border-0', 'rounded-0');

Expand All @@ -45,14 +45,13 @@ export default (elements, i18n, state) => {

li.append(h3, p);
lists.append(li);
feedView.append(lists);
feedContainer.append(feedView);
feedContainer.append(lists);
});
};

const renderPosts = () => {
const postsContainer = document.querySelector('.posts');
const postsView = renderBlock(t('postsTitle'));
renderBlock(t('postsTitle'));
const lists = document.createElement('ul');
lists.classList.add('list-group', 'border-0', 'rounded-0');

Expand All @@ -76,8 +75,7 @@ export default (elements, i18n, state) => {

li.append(link, button);
lists.append(li);
postsView.append(lists);
postsContainer.append(postsView);
postsContainer.append(lists);
});
};

Expand Down

0 comments on commit e093d2c

Please sign in to comment.