I don't want to display avatars, I want my left bubbles to stick on the left but I cannot find the right propStyle to pass to GiftedChat and don't even find where the left is applied.
I don't have an avatar prop in my messages and I can confirm that messageImage is not rendered here
Could you please tell me what prop I should pass and what is the right component to pass prop to ?
Thanks
Hey @l1br3,
that is actually pretty easy to do.
You should check out the README.md. You can find all kinds of functions to help you customize your chat.
One of those functions is called : _renderAvatar_
renderAvatar (Function) - Custom message avatar; set to null to not render any avatar for the message
The messages will automatically allign with the left border of the window.
So you can just use this function and set it to null like this:
(This is the GC example)
```
render() {
return (
onSend={this.onSend}
loadEarlier={this.state.loadEarlier}
onLoadEarlier={this.onLoadEarlier}
isLoadingEarlier={this.state.isLoadingEarlier}
user={{
_id: 1, // sent messages should have same user._id
}}
renderActions={this.renderCustomActions}
renderBubble={this.renderBubble}
renderCustomView={this.renderCustomView}
renderFooter={this.renderFooter}
renderAvatar = {null}
/>
);
}
}
```
This should work pretty good. Tell us if it worked for you!
Please feel free to reopen if the solution purposed by @vgorte does not work, but it should.
Thanks!
@vgorte @brunocascio It was easy ! Thank you for your help !
Most helpful comment
Hey @l1br3,
that is actually pretty easy to do.
You should check out the README.md. You can find all kinds of functions to help you customize your chat.
One of those functions is called : _renderAvatar_
The messages will automatically allign with the left border of the window.
So you can just use this function and set it to
nulllike this:(This is the GC example)
```
messages={this.state.messages}
render() {
return (
onSend={this.onSend}
loadEarlier={this.state.loadEarlier}
onLoadEarlier={this.onLoadEarlier}
isLoadingEarlier={this.state.isLoadingEarlier}
user={{
_id: 1, // sent messages should have same user._id
}}
renderActions={this.renderCustomActions}
renderBubble={this.renderBubble}
renderCustomView={this.renderCustomView}
renderFooter={this.renderFooter}
}
}
```
This should work pretty good. Tell us if it worked for you!