diff --git a/frontend/src/components/inbox/hooks/ChatContext.tsx b/frontend/src/components/inbox/hooks/ChatContext.tsx index ff69d316..ca3e52fa 100644 --- a/frontend/src/components/inbox/hooks/ChatContext.tsx +++ b/frontend/src/components/inbox/hooks/ChatContext.tsx @@ -25,7 +25,7 @@ interface IChatContext { setSubscriberId: Dispatch; } -const chatContext = createContext({ +const ChatContext = createContext({ subscriber: null, setSubscriberId: noop, }); @@ -49,7 +49,7 @@ export const ChatProvider = ({ children }: PropsWithChildren) => { }; return ( - {children} + {children} ); }; @@ -58,7 +58,7 @@ export const ChatProvider = ({ children }: PropsWithChildren) => { * @description this hook is used to get the active chat */ export const useChat = () => { - const context = useContext(chatContext); + const context = useContext(ChatContext); if (!context) { throw new Error("useChat must be used within a ChatProvider");