Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda