Skip to content

Hydration warning in UserManagementTable dialogs: invalid HTML nesting inside AlertDialogDescription #3

@jfut

Description

@jfut

Hi,

I found an HTML nesting issue in @bettercone/ui that causes React hydration warnings when opening UserManagementTable dialogs.

Summary

UserManagementTable renders block elements (div and p) inside AlertDialogDescription.
AlertDialogDescription renders a <p> internally, so this creates invalid markup (<p> inside <p>, and <div> inside <p>).

Steps to reproduce

  1. Use @bettercone/ui@0.5.2 in a React app.
  2. Render <UserManagementTable />.
  3. Open the admin user list page.
  4. Click Ban User (also reproducible with Unban User and Delete User dialogs).

Actual result

Console warnings appear when the dialog opens:

  • In HTML, <p> cannot be a descendant of <p>. This will cause a hydration error.
  • In HTML, <div> cannot be a descendant of <p>. This will cause a hydration error.

Expected result

No invalid HTML nesting and no hydration warnings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions