diff --git a/client/src/router.tsx b/client/src/router.tsx
index 7bbddd4..8ed3403 100644
--- a/client/src/router.tsx
+++ b/client/src/router.tsx
@@ -79,11 +79,11 @@
           <Route
             path="conversation/:conversationId"
             element={
-              <Messenger>
-                <ConversationProvider>
+              <ConversationProvider>
+                <Messenger>
                   <Outlet />
-                </ConversationProvider>
-              </Messenger>
+                </Messenger>
+              </ConversationProvider>
             }
           >
             <Route index element={<ConversationView />} />
