This is probably an easy one, but I cant seem to figure it out. How do I print the numbers in order inside my list? If i print index some of the numbers will be skipped due to my conditions? Can i set an count++ somewhere inside my map-function inside my condition so it will increase every time a list-item is printed?
export const MFAPaging = ({rootStore, page}) => {
let count = 1;
return (
<div className="components-paging-brder">
<div className="components-paging">
<ul>
{rootStore.mfaStore.links.map((item, index) =>
item && item.includePage ?
<li className={page == index ? 'active' : ''} key={index}>{count}</li>
: undefined
)}
</ul>
<MFAButtons rootStore={rootStore} page={page} />
</div>
</div>
);
};