chat-ui-kit-react icon indicating copy to clipboard operation
chat-ui-kit-react copied to clipboard

Avatar isn't displayed when custom content is used

Open ClydeDz opened this issue 7 months ago • 0 comments

Hi,

I've been using this library for my chat app, and it's been so easy to get something done really quickly.

I'm stuck with this problem - when displaying custom content like the code snippet below, I cannot get the Avatar to display beside it. I've tried several combinations with no luck. Any idea how to fix this?

This is the code snippet:

 <Message
    key={index}
    model={{
      type: "custom",
      sentTime: message.timestamp,
      sender: message.from,
      direction:  "incoming"
    }}
    children={<Avatar src="image-location.jpg" name="profile name" />}
    avatarSpacer={true}
  >
    <Message.CustomContent>
      <div>
        <Button border>Some action goes here</Button> 
      </div>
    </Message.CustomContent>
  </Message>

This is the output: image

ClydeDz avatar Jun 29 '24 09:06 ClydeDz