Read a graphql richtext

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 tailwind
  • here:, bring to me undefined five times

And I want some thing like this:

  1. numeber one
  2. number two
  3. number three
    1. number one in three
    2. number two in three
  4. number four
  5. 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>;
          }
        }