Skip to content

Commit

Permalink
Fix validateDOMNesting error
Browse files Browse the repository at this point in the history
Message: "validateDOMNesting(...): <button> cannot appear as a
descendant of <button>"
  • Loading branch information
canac committed Dec 19, 2024
1 parent eaf5e36 commit 75421c8
Showing 1 changed file with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,18 @@ const ProfileName = ({
{!impersonating && (
<IconButton onClick={onProfileMenuOpen} data-testid="profileMenuButton">
<Box display="flex" alignItems="center" m={-1}>
<IconButton>
{loading || !avatar ? (
<StyledAccountIcon data-testid="AccountIconInTopBar" />
) : (
<Avatar
data-testid="AvatarInTopBar"
src={avatar}
sx={{
width: 30,
height: 30,
}}
/>
)}
</IconButton>
{loading || !avatar ? (
<StyledAccountIcon data-testid="AccountIconInTopBar" />
) : (
<Avatar
data-testid="AvatarInTopBar"
src={avatar}
sx={{
width: 30,
height: 30,
}}
/>
)}
{children}
</Box>
</IconButton>
Expand Down

0 comments on commit 75421c8

Please sign in to comment.