Skip to content

Commit d444b2b

Browse files
committed
fix display without avatar
1 parent 94c18a8 commit d444b2b

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/components/Chat/ChatContent.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,19 @@ export const ChatContent = ({
9696
marginRight: alignment === "left" && indentationSize ? indentationSizes[indentationSize] : undefined,
9797
}}
9898
>
99-
{avatar ? (
100-
<FlexibleLayoutContainer noEqualItemSpace gapSize="tiny">
99+
<FlexibleLayoutContainer noEqualItemSpace gapSize="tiny">
100+
{avatar && (
101101
<FlexibleLayoutItem
102+
className={`${eccgui}-chat__content-avatar`}
102103
growFactor={0}
103104
shrinkFactor={0}
104105
style={alignment === "right" ? { order: 1 } : undefined}
105106
>
106107
{React.cloneElement(avatar, { size: "small", ratio: "1:1", rounded: true, resizing: "cover" })}
107108
</FlexibleLayoutItem>
108-
<FlexibleLayoutItem className={`${eccgui}-chat__content-wrapper`}>{content}</FlexibleLayoutItem>
109-
</FlexibleLayoutContainer>
110-
) : (
111-
content
112-
)}
109+
)}
110+
<FlexibleLayoutItem className={`${eccgui}-chat__content-wrapper`}>{content}</FlexibleLayoutItem>
111+
</FlexibleLayoutContainer>
113112
</div>
114113
);
115114
};

0 commit comments

Comments
 (0)