From b360807f9d04b0ee88ce6a732a78b4e05e715794 Mon Sep 17 00:00:00 2001 From: bluedeepart Date: Fri, 17 Jan 2025 15:18:22 +0530 Subject: [PATCH] lint fixes --- blocks/header/header-megamenu-components.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/blocks/header/header-megamenu-components.js b/blocks/header/header-megamenu-components.js index f0287560b..4a0ad6177 100644 --- a/blocks/header/header-megamenu-components.js +++ b/blocks/header/header-megamenu-components.js @@ -262,18 +262,16 @@ function buildEventCardSubmenu(block) { /* RECENT NEWS */ async function recentNewsHandler() { - const eventsMenu = div({ class: ['flex-space-between'] }); - document.querySelector('.news-cards-submenu').replaceChildren(eventsMenu); + const newsMenu = div({ class: ['flex-space-between'] }); + document.querySelector('.news-cards-submenu').replaceChildren(newsMenu); const news = await ffetch('/query-index.json') .sheet('news') .limit(1) .all(); - console.log(news); news.forEach((item) => { const newsDate = formatDate(unixDateToString(item.date)); - console.log(newsDate); const title = div(h3({ id: toClassName(item.title) }, item.title)); const newsContent = div( div( @@ -296,7 +294,7 @@ async function recentNewsHandler() { title, newsContent, ); - eventsMenu.replaceWith(newsBlock); + newsMenu.replaceWith(newsBlock); }); }