first of all, sorry for eventualy bad english writte =)
Ok, my trouble is about read a richtext maked in graphcms and bring to my jsx.
I can’t read a list-numered array. Tried a case type: numbered-list, so it’s work, but can’t map a array to show my list, lets code:
class='list-decimal'
is tailwindhere:
, bring to meundefined
five times
And I want some thing like this:
- numeber one
- number two
- number three
- number one in three
- number two in three
- number four
- number five
const getContentFragment = (index, text, obj, type) => {
let modifiedText = text;
switch (type) {
case 'numbered-list':
return <p key={index} class="list-decimal">
<ol>
{modifiedText.map((item, i) =>
<React.Fragment key={i}>
<li>
{item}
{console.log('here:', item)} </li>
</React.Fragment>
)
}
</ol>
</p>;
}
}