Open
Conversation
lielsa2023
approved these changes
Aug 11, 2024
e171271
requested changes
Aug 14, 2024
| let cntUnreadMessages = messages.filter(message => !message.read).length; | ||
| const MessageIcon = () => { | ||
| const [openMesagges,setOpenMesagges] = useState(false); | ||
| const userId = '66961bef8ca0916dcbfdabc3'; //change the userId according the correct user... |
Collaborator
There was a problem hiding this comment.
you can't insert code with hard-code values
Collaborator
Author
There was a problem hiding this comment.
but now i dont have userId, so what to put here?
Collaborator
There was a problem hiding this comment.
it should come from the redux.
| const [socket, setSocket] = useState(null); | ||
|
|
||
| useEffect(() => { | ||
| const ws = new WebSocket('ws://localhost:8080'); |
Collaborator
There was a problem hiding this comment.
please save the ws url in env variable
Collaborator
There was a problem hiding this comment.
same comments as other files, please notice:
- each res.status or next should have return statements and status code
- access to collections and logics should be in service file.
Collaborator
Author
There was a problem hiding this comment.
[server-side/controllers/messageType.controller.js is not my page - i didnt wrote them.
you dont have to uploud it.
Collaborator
There was a problem hiding this comment.
I can't upload only part of the branch, you should be care that the changes that exists in your branch are only yours
server-side/webSocket.js
Outdated
| const eventEmitter = new EventEmitter(); | ||
|
|
||
| wss.on('connection', (ws) => { | ||
| console.log('Client connected'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.