Skip to content

Commit

Permalink
Fix prettier comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmejiadev authored and xcarpentier committed Feb 17, 2021
1 parent 7dc2cb4 commit deeabc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
16 changes: 9 additions & 7 deletions src/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export interface AvatarProps<TMessage extends IMessage> {
onLongPressAvatar?(user: User): void
}

export function Avatar<TMessage extends IMessage = IMessage>(props: AvatarProps<TMessage>) {
export function Avatar<TMessage extends IMessage = IMessage>(
props: AvatarProps<TMessage>,
) {
const {
renderAvatarOnTop,
showAvatarForEveryMessage,
Expand All @@ -83,7 +85,6 @@ export function Avatar<TMessage extends IMessage = IMessage>(props: AvatarProps<
isSameUser(currentMessage, messageToCompare) &&
isSameDay(currentMessage, messageToCompare)
) {

return (
<View
style={[
Expand Down Expand Up @@ -115,13 +116,14 @@ export function Avatar<TMessage extends IMessage = IMessage>(props: AvatarProps<
avatarStyle={
[
styles[props.position].image,
props.imageStyle &&
props.imageStyle[props.position],
props.imageStyle && props.imageStyle[props.position],
] as ImageStyle
}
user={props.currentMessage.user}
onPress={() => props.onPressAvatar?.(props.currentMessage!.user)}
onLongPress={() => props.onLongPressAvatar?.(props.currentMessage!.user)}
onLongPress={() =>
props.onLongPressAvatar?.(props.currentMessage!.user)
}
/>
)
}
Expand Down Expand Up @@ -153,8 +155,8 @@ Avatar.defaultProps = {
nextMessage: {},
containerStyle: {},
imageStyle: {},
onPressAvatar: () => { },
onLongPressAvatar: () => { },
onPressAvatar: () => {},
onLongPressAvatar: () => {},
}

Avatar.propTypes = {
Expand Down
7 changes: 4 additions & 3 deletions src/MessageVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ export function MessageVideo(_props: any) {
<View style={{ padding: 20 }}>
<Text style={{ color: Color.alizarin, fontWeight: '600' }}>
Video is not implemented by GiftedChat.
</Text>
</Text>
<Text style={{ color: Color.alizarin, fontWeight: '600' }}>
You need to provide your own implementation by using renderMessageVideo prop.
</Text>
You need to provide your own implementation by using renderMessageVideo
prop.
</Text>
</View>
)
}

0 comments on commit deeabc8

Please sign in to comment.