diff --git a/src/components/PageWrapper.tsx b/src/components/PageWrapper.tsx index 26bec676..2b3ac851 100644 --- a/src/components/PageWrapper.tsx +++ b/src/components/PageWrapper.tsx @@ -49,7 +49,7 @@ const PageWrapper = ({ children }: ProviderType) => { }`} > - {children} + {children} ); }; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 0e6048af..74591569 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -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'; @@ -16,8 +17,10 @@ export default function App({ Component, pageProps }: AppProps) { - - + + + + diff --git a/src/reducer/chatReducer.ts b/src/reducer/chatReducer.ts index 8114d31e..83af847f 100644 --- a/src/reducer/chatReducer.ts +++ b/src/reducer/chatReducer.ts @@ -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(),