Skip to content

Commit

Permalink
Merge pull request #834 from gympass/DS-868
Browse files Browse the repository at this point in the history
fix: [DS-868] Revert result avatar fragment removal
  • Loading branch information
flavia-moraes authored Jun 25, 2024
2 parents 7b9f431 + 37cd23f commit d5c2d14
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 d5c2d14

Please sign in to comment.