Skip to content

Commit

Permalink
fix: revert result avatar fragment removal
Browse files Browse the repository at this point in the history
  • Loading branch information
ffeliperocha committed Jun 25, 2024
1 parent 7b9f431 commit 37cd23f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ describe('TextWithBadge', () => {
it('should match snapshot', () => {
const { toJSON } = render(
<ThemeProvider>
<TextWithBadge
avatarWidth={50}
badgeIcon={WellhubIcon}
title="Text with badge"
/>
<TextWithBadge badgeIcon={WellhubIcon} title="Text with badge" />
</ThemeProvider>,
);

Expand All @@ -24,7 +20,6 @@ describe('TextWithBadge', () => {
const { toJSON } = render(
<ThemeProvider>
<TextWithBadge
avatarWidth={50}
badgeIcon={WellhubIcon}
title="This is an example of a very long title that should be truncated"
/>
Expand All @@ -37,11 +32,7 @@ describe('TextWithBadge', () => {
it('should match snapshot without badgeIcon', () => {
const { toJSON } = render(
<ThemeProvider>
<TextWithBadge
avatarWidth={50}
badgeIcon={null}
title="Title without Badge"
/>
<TextWithBadge badgeIcon={null} title="Title without Badge" />
</ThemeProvider>,
);

Expand Down
2 changes: 1 addition & 1 deletion packages/yoga/src/Result/native/Result/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Result = ({
}) => {
return (
<StyledBox divided={divided} display="flex" flexDirection="row">
{Avatar && isValidElement(Avatar) ? Avatar : <Avatar />}
{Avatar && <>{isValidElement(Avatar) ? Avatar : <Avatar />}</>}
<Content>
{!!attendances?.length && (
<Attendances
Expand Down

0 comments on commit 37cd23f

Please sign in to comment.