Skip to content

Commit

Permalink
fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rgravitvl committed Feb 6, 2024
1 parent 819fa2a commit a1a248d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tools/importer/transformers/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
6 changes: 3 additions & 3 deletions tools/importer/transformers/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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));
},
};

0 comments on commit a1a248d

Please sign in to comment.