소스 검색

fix: typo

雲霧 1 년 전
부모
커밋
79f58f5c6a
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      app/components/chat.tsx

+ 3 - 3
app/components/chat.tsx

@@ -545,7 +545,7 @@ export function Chat() {
     }
     }
   };
   };
 
 
-  const findLastUesrIndex = (messageId: number) => {
+  const findLastUserIndex = (messageId: number) => {
     // find last user input message and resend
     // find last user input message and resend
     let lastUserMessageIndex: number | null = null;
     let lastUserMessageIndex: number | null = null;
     for (let i = 0; i < session.messages.length; i += 1) {
     for (let i = 0; i < session.messages.length; i += 1) {
@@ -568,14 +568,14 @@ export function Chat() {
   };
   };
 
 
   const onDelete = (botMessageId: number) => {
   const onDelete = (botMessageId: number) => {
-    const userIndex = findLastUesrIndex(botMessageId);
+    const userIndex = findLastUserIndex(botMessageId);
     if (userIndex === null) return;
     if (userIndex === null) return;
     deleteMessage(userIndex);
     deleteMessage(userIndex);
   };
   };
 
 
   const onResend = (botMessageId: number) => {
   const onResend = (botMessageId: number) => {
     // find last user input message and resend
     // find last user input message and resend
-    const userIndex = findLastUesrIndex(botMessageId);
+    const userIndex = findLastUserIndex(botMessageId);
     if (userIndex === null) return;
     if (userIndex === null) return;
 
 
     setIsLoading(true);
     setIsLoading(true);