From 7d3cca6f74a44c9d0fc816e74eefb32dde9a24a4 Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Fri, 9 May 2025 17:45:25 +0100 Subject: [PATCH] fix(frontend): rename ChatContext --- frontend/src/components/inbox/hooks/ChatContext.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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");