Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
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>;
          }
        }

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!