message: fix(pattern): changed logic behind ul tags rendering
diff: @@ -76,25 +76,40 @@ function renderListItems(links) {
  );
  });
  - return renderedLinks.map((elem, index, origin) => {
  - if (index == 0) {
  + const chunked_arr = [];
  + chunked_arr.push(renderedLinks[0]);
  + let index = 1;
  + while (index < renderedLinks.length) {
  + chunked_arr.push(renderedLinks.slice(index, 2 + index));
  + index += 2;
  + }
  + console.log('chunked', chunked_arr);
  +
  + return chunked_arr.map((elem, index) => {
  + if (index === chunked_arr.length - 1) {
  + if (elem.length === 1) {
  return (
  <ul className={`${prefix}--legal-nav__holder`} key={index}>
  {elem}
  + {renderTrusteItem()}
  </ul>
  );
  - } else if (index % 2 != 0 && origin[index + 1] != undefined) {
  + } else {
  return (
  + <>
  <ul className={`${prefix}--legal-nav__holder`} key={index}>
  {elem}
  - {origin[index + 1]}
  </ul>
  + <ul className={`${prefix}--legal-nav__holder`} key={index}>
  + {renderTrusteItem()}
  + </ul>
  + </>
  );
  - } else if (origin[index + 1] != undefined) {
  + }
  + } else {
  return (
  <ul className={`${prefix}--legal-nav__holder`} key={index}>
  - {origin[index + 1]}
  - {renderTrusteItem()}
  + {elem}
  </ul>
  );
  }
  