Description
The logic managing chat messages, typing state, and sending mock responses is intertwined with the UI in page.tsx.
Requirements
- Create
src/hooks/useChat.ts.
- Move
messages, isTyping, inputState and handleSendMessage into this hook.
- Return necessary state and handlers to be consumed by
ChatInterface.tsx.
Acceptance Criteria
Description
The logic managing chat messages, typing state, and sending mock responses is intertwined with the UI in
page.tsx.Requirements
src/hooks/useChat.ts.messages,isTyping,inputStateandhandleSendMessageinto this hook.ChatInterface.tsx.Acceptance Criteria