From a1a248d517f885e5c524f22e0146a6941072f109 Mon Sep 17 00:00:00 2001 From: rgravitvl Date: Tue, 6 Feb 2024 13:30:21 +0530 Subject: [PATCH] fixed lint issues --- tools/importer/transformers/columns.js | 6 +++--- tools/importer/transformers/util.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/importer/transformers/columns.js b/tools/importer/transformers/columns.js index c48521831..edbbad1d8 100644 --- a/tools/importer/transformers/columns.js +++ b/tools/importer/transformers/columns.js @@ -41,9 +41,9 @@ const createAllColumns = (allColumns, document, noOfColumn) => { } else if (element.className === 'grid') { const gridEl = element.querySelector('grid'); const gridTemplates = gridEl.querySelectorAll('template'); - [...gridTemplates].forEach((template) => { - [...template.content.children].forEach((element) => { - render[element.className](element, row, document); + [...gridTemplates].forEach((gridTemplate) => { + [...gridTemplate.content.children].forEach((gridElement) => { + render[gridElement.className](gridElement, row, document); }); }); } else if (element.className !== 'articlecard') { diff --git a/tools/importer/transformers/util.js b/tools/importer/transformers/util.js index 3f57d5200..bf1b3b591 100644 --- a/tools/importer/transformers/util.js +++ b/tools/importer/transformers/util.js @@ -157,7 +157,7 @@ export const imageText = (imgText, document) => { return imgText; }; -export const button = (button, document) => { +export const getButton = (button, document) => { const buttonEl = button?.querySelector('buttontrending') ? button?.querySelector('buttontrending') : button?.querySelector('button'); const btn = document.createElement('a'); btn.textContent = buttonEl.getAttribute('btntext'); @@ -306,10 +306,10 @@ export const render = { }, buttontrending: (item, row, document) => { - row.push(button(item, document)); + row.push(getButton(item, document)); }, button: (item, row, document) => { - row.push(button(item, document)); + row.push(getButton(item, document)); }, };