Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested <li> tags causing hydration errors in Next.js #133

Open
artem-gusev-from-ownr opened this issue Dec 27, 2024 · 0 comments
Open

Nested <li> tags causing hydration errors in Next.js #133

artem-gusev-from-ownr opened this issue Dec 27, 2024 · 0 comments

Comments

@artem-gusev-from-ownr
Copy link

artem-gusev-from-ownr commented Dec 27, 2024

Hello, this is basically a continuation of this issue

I have very simple, one-leveled list on the Hygraph content field. But when it comes to the RichEditor component there is always nested <li> inside.

Here is the screenshot of the content on Hygraph
Screenshot 2024-12-27 at 11 42 47

And here how it's actually transformed when it passed down to RichText component.

    "children": [
      {
        "type": "paragraph",
        "children": [
          {
            "bold": true,
            "text": "OWNR lets you buy later at a rate that is better for you"
          }
        ]
      },
      {
        "type": "bulleted-list",
        "children": [
          {
            "type": "list-item",
            "children": [
              {
                "type": "list-item-child",
                "children": [
                  {
                    "type": "list-item",
                    "children": [
                      {
                        "type": "list-item-child",
                        "children": [
                          {
                            "text": "There are no broker fees with OWNR, so it doesn’t impact on your savings. "
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "list-item",
            "children": [
              {
                "type": "list-item-child",
                "children": [
                  {
                    "type": "list-item",
                    "children": [
                      {
                        "type": "list-item-child",
                        "children": [
                          {
                            "text": "You don’t have to pay a deposit either, meaning you can invest the money for later. "
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "list-item",
            "children": [
              {
                "type": "list-item-child",
                "children": [
                  {
                    "type": "list-item",
                    "children": [
                      {
                        "type": "list-item-child",
                        "children": [
                          {
                            "text": "OWNR puts 10% of the leasing rate towards your equity share. "
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "list-item",
            "children": [
              {
                "type": "list-item-child",
                "children": [
                  {
                    "type": "list-item",
                    "children": [
                      {
                        "type": "list-item-child",
                        "children": [
                          {
                            "text": "There’s no need for you to renovate, because OWNR takes care of it before you move in. "
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      {
        "type": "paragraph",
        "children": [
          {
            "text": ""
          }
        ]
      }
    ]
  }

As you can see, there is always list-item that is nested withing another list-item

I hope that it will help to identify the issue faster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant