Closed MJinH closed 9 months ago
Someone is attempting to deploy a commit to a Personal Account owned by @Dun-sin on Vercel.
@Dun-sin first needs to authorize it.
Will review this later in the day @MJinH in the mean time, please remove the package files, don't delete them but remove them from your PR. Thanks
Could you please check this? in the ChatContext.tsx file, when the name is "chatId" in the createChat, it seems to result in 'undefined' in the chatReducer as shown in the image. When using 'id', it looks like it's assigned correctly. Please let me know if i missed something. Also, yes you're right. I forgot to remove the context in the PageWrapper.tsx file.
Could you please check this? in the ChatContext.tsx file, when the name is "chatId" in the createChat, it seems to result in 'undefined' in the chatReducer as shown in the image. When using 'id', it looks like it's assigned correctly. Please let me know if i missed something. Also, yes you're right. I forgot to remove the context in the PageWrapper.tsx file.
i guess the issue comes from here: remove the ID and leave the chat Id, should fix it, can't believe i missed that making it, also i would prefer the provider to be the in the pageWrapper:
chatId,
not thisπ https://github.com/Dun-sin/Whisper/blob/94b3b503ac05dd3d4cf6e9ad6250da494cead95c/src/reducer/chatReducer.ts#L24
got it, and if the provider is in PageWrapper, the createChat in anonymous.tsx doesn't seem to be called properly. When debugging, it gets called as createChat: () => {}
and exits immediately. can you please check this as well?
I'll fix those and recommit later. Thank you.
Also @MJinH what exactly do you mean in Anonmyous.tsx?
What I mean is, when ChatProvider is in PageWrapper, createChat is exeucted like this room-1.webm
and this is when the provider is in _app.tsx
What I mean is, when ChatProvider is in PageWrapper, createChat is exeucted like this room-1.webm
and this is when the provider is in _app.tsx
I see your point, yours is a better way thenπͺπ½ but the other things still count
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
whisper | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jan 6, 2024 7:45am |
Fixes Issue
My PR closes #577
π¨βπ» Changes proposed(What did you do ?)
commented out the lines in anonymous.tsx file. Had an issue where the socket would connect on the server side but immediately disconnect on the client side, which was causing the
NEW_EVENT_CHAT_RESTORE
event to not work properly.After debugging, noticed that the
createChat
function wasn't being called properly in the anonymous.tsx file. suspect this was because it was being called before the provider was initialized, so wrapped the components withChatProvider
in the _app.tsx file and confirmed that it was working correctly.βοΈ Check List (Check all the applicable boxes)
Note to reviewers
π· Screenshots