Skip to content

Commit

Permalink
Merge pull request #550 from WWWPiramalFinanceCOM/feature/bugfixes-dev
Browse files Browse the repository at this point in the history
Feature/bugfixes dev
  • Loading branch information
nky11 authored Oct 14, 2024
2 parents 3315091 + d0d74e8 commit 6065545
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions blocks/authorisedagencies/authorisedagencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ import { ctaClickInteraction } from '../../dl.js';
export default async function decorate(block) {
const cfURL = block.textContent.trim();
const cfRepsonse = await fetchApiCall(cfURL);
const repsonseData = cfRepsonse.data[0].data;
const jsonResponseData = JSON.parse(repsonseData);
const repsonseData = cfRepsonse.data;
const result = Object.groupBy(repsonseData, ({ Location }) => {
const lowercaseLocation = Location.toLowerCase();
return lowercaseLocation.charAt(0).toUpperCase() + lowercaseLocation.slice(1);
});
const jsonResponseData = (result);
const selectContainerWrapper = createAndAppend('div', '', 'select-container-wrapper');
const selectContainer = createAndAppend('div', '', 'select-container');
const cardContainer = createAndAppend('div', '', 'card-container');
Expand Down

0 comments on commit 6065545

Please sign in to comment.