From d9f3e5faabe794904f72b3fca4f912f270e15c83 Mon Sep 17 00:00:00 2001 From: Spencer Lochne Date: Tue, 10 Jun 2025 12:52:21 -0400 Subject: [PATCH] 11k Solution --- .../src/components/ChatInput.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/2-copy-of-code/lesson-11/chatbot-project/src/components/ChatInput.tsx b/2-copy-of-code/lesson-11/chatbot-project/src/components/ChatInput.tsx index 254dc8b..cc2e0d7 100644 --- a/2-copy-of-code/lesson-11/chatbot-project/src/components/ChatInput.tsx +++ b/2-copy-of-code/lesson-11/chatbot-project/src/components/ChatInput.tsx @@ -2,17 +2,15 @@ import { useState } from 'react' import { Chatbot } from 'supersimpledev'; import './ChatInput.css'; +type ChatMessages = { + message: string; + sender: string; + id: string; +}[]; + type ChatInputProps = { - chatMessages: { - message: string; - sender: string; - id: string; - }[]; - setChatMessages: (chatMessages: { - message: string; - sender: string; - id: string; - }[]) => void; + chatMessages: ChatMessages; + setChatMessages: (chatMessages: ChatMessages) => void; }; export function ChatInput({ chatMessages, setChatMessages }: ChatInputProps) {