Showing 2 of 4 total issues
Function app
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const app = () => {
const userLocale = navigator.languages && navigator.languages.length
? navigator.languages[0]
: navigator.language;
const i18n = i18next.createInstance({ lng: userLocale });
Function renderPosts
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderPosts = (posts, openedPostsIds, i18n) => {
const postsContainer = document.querySelector('.posts');
postsContainer.innerHTML = '';
const postsTitle = document.createElement('h2');
const postsList = document.createElement('ul');