Short summary
Rendering the profile/dashboard pages triggers a React hydration error because a element is rendered inside another . This violates HTML semantics and causes hydration warnings/errors in Next.js.
Steps to reproduce
- Navigate to Dashboard → Profile
- Locate the Logout button implementation
- LogoutButton wraps a Button component while also rendering a native
This creates nested elements
React/Next.js throws a hydration error
Expected behavior
The Profile page should render without hydration errors, and the Logout button should not render nested
elements.
Actual behavior
React/Next.js reports:
In HTML,
cannot be a descendant of .
This will cause a hydration error.
The LogoutButton component renders a native
that wraps a Button component, resulting in invalid HTML.
Affected area
Dashboard
Environment
Browser: Brave
OS: EndeavourOS
Environment: Local development
Next.js: 15.5.18
Database: MongoDB (local)
Screenshots, logs, or recordings
Confirmation
Short summary
Rendering the profile/dashboard pages triggers a React hydration error because a element is rendered inside another . This violates HTML semantics and causes hydration warnings/errors in Next.js.
Steps to reproduce
Expected behavior
The Profile page should render without hydration errors, and the Logout button should not render nested
elements.Actual behavior
React/Next.js reports:
In HTML,
cannot be a descendant of .This will cause a hydration error.
The LogoutButton component renders a native
that wraps a Button component, resulting in invalid HTML.Affected area
Dashboard
Environment
Browser: Brave
OS: EndeavourOS
Environment: Local development
Next.js: 15.5.18
Database: MongoDB (local)
Screenshots, logs, or recordings
Confirmation