Skip to content

Commit

Permalink
fix: Room not found (#584)
Browse files Browse the repository at this point in the history
Co-authored-by: moon19960501@gmail.com <wenzhenhe1@gmail.com>
Co-authored-by: Dunsin <78784850+Dun-sin@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 6, 2024
1 parent ac687fe commit 55b1794
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/PageWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const PageWrapper = ({ children }: ProviderType) => {
}`}
>
<NavBar />
<ChatProvider>{children}</ChatProvider>
{children}
</section>
);
};
Expand Down
7 changes: 5 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AppProvider } from '@/context/AppContext';
import { AuthProvider } from '@/context/AuthContext';
import { SocketProvider } from '@/context/SocketContext';
import { DialogProvider } from '@/context/DialogContext';
import { ChatProvider } from '@/context/ChatContext';

import Dialog from '@/components/Dialog';

Expand All @@ -16,8 +17,10 @@ export default function App({ Component, pageProps }: AppProps) {
<AppProvider>
<SocketProvider>
<DialogProvider>
<Component {...pageProps} />
<Dialog />
<ChatProvider>
<Component {...pageProps} />
<Dialog />
</ChatProvider>
</DialogProvider>
</SocketProvider>
</AppProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/reducer/chatReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function chatReducer(state: ChatIdType, action: any) {
switch (action.type) {
case 'CREATE_CHAT': {
const {
id: chatId,
chatId,
userIds,
messages = messageInitial,
createdAt = new Date(),
Expand Down

1 comment on commit 55b1794

@vercel
Copy link

@vercel vercel bot commented on 55b1794 Jan 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.