-
Notifications
You must be signed in to change notification settings - Fork 0
Stopped using reload for edit and delete messages and using state, and finished replying to messages #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sync-up PR (Nicholas)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more things to change. Following PR review on Backend, you may have to change your sender
references here to real user IDs; do take note.
}; | ||
ws.current.send(JSON.stringify(editedMessage)); | ||
setMessages((prevMessages) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the server not send an edit
message event, triggering the edit
event handling code on lines 75-82?
return new Date(date).toLocaleDateString(undefined, options); | ||
}; | ||
|
||
const shouldDisplayDate = (currentMessage, previousMessage) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well-implemented logic here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What was done since the last PR: