Skip to content

Commit

Permalink
Fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rgravitvl committed Jul 15, 2024
1 parent b806d83 commit 154adad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions blocks/product-card/product-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ export function createCard(product, idx, firstCard = false) {
export default async function decorate(block) {
const response = await getProductsOnSolutionsResponse();
if (response?.results.length > 0) {

if(window.location.pathname.includes('process-steps')) buildItemListSchema(response?.results, 'solution-products-steps');
if (window.location.pathname.includes('process-steps')) buildItemListSchema(response?.results, 'solution-products-steps');
else buildItemListSchema(response?.results, 'solution-products');

const cardList = ul({
Expand Down
1 change: 0 additions & 1 deletion blocks/side-nav/side-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
} from '../../scripts/dom-builder.js';
import ffetch from '../../scripts/ffetch.js';
import { getMetadata } from '../../scripts/lib-franklin.js';
import { buildItemListSchema } from '../../scripts/schema.js';
import { makePublicUrl } from '../../scripts/scripts.js';
import { fetchTopicsForCategory } from '../topic-list/topic-list.js';

Expand Down
8 changes: 4 additions & 4 deletions scripts/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function generateItemListElement(type, position, url, name, image, description)
name,
image,
description,
}
},
};
}

Expand All @@ -124,9 +124,9 @@ const productType = ['product-family', 'product-category'];
// eslint-disable-next-line import/prefer-default-export
export function buildItemListSchema(srcObj, type) {
let name;
if(productType.includes(type)) name = `${document.querySelector('h1').textContent} - Types`;
else if(type === 'workflow') name = `${document.querySelector('h1').textContent} Process Steps`;
else if(type === 'solution-products-steps') name = `${document.querySelector('h1').textContent} - Products`;
if (productType.includes(type)) name = `${document.querySelector('h1').textContent} - Types`;
else if (type === 'workflow') name = `${document.querySelector('h1').textContent} Process Steps`;
else if (type === 'solution-products-steps') name = `${document.querySelector('h1').textContent} - Products`;
else name = document.querySelector('h1').textContent;

const data = {
Expand Down

0 comments on commit 154adad

Please sign in to comment.