From 9aa092c310689d9c1c80fea17857d71abcdeb90c Mon Sep 17 00:00:00 2001 From: Choi JunHo Date: Tue, 20 Aug 2024 00:36:19 +0900 Subject: [PATCH] hot-fix --- src/api/search-auto-complete.ts | 4 +++- src/ui/components/molecule/chat-form/chat-form.tsx | 1 + src/ui/pages/maru-egg.tsx | 6 ------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/api/search-auto-complete.ts b/src/api/search-auto-complete.ts index 3ff8e8b..8be00ba 100644 --- a/src/api/search-auto-complete.ts +++ b/src/api/search-auto-complete.ts @@ -1,11 +1,13 @@ import { server_axiosInstance } from '../utils/axios'; -export async function searchAutoComplete(content: string): Promise { +export async function searchAutoComplete(content: string, category?: string, type?: string): Promise { try { const response = await server_axiosInstance.get('/api/questions/search', { params: { content: content, size: 5, + type: type, + category: category, }, }); return response.data; diff --git a/src/ui/components/molecule/chat-form/chat-form.tsx b/src/ui/components/molecule/chat-form/chat-form.tsx index 55d4f00..effe0ee 100644 --- a/src/ui/components/molecule/chat-form/chat-form.tsx +++ b/src/ui/components/molecule/chat-form/chat-form.tsx @@ -51,6 +51,7 @@ const ChatForm = ({ type, category }: ChatFormProps) => { const response = await SearchById(selectedId); useChatStore.getState().updateLastMessage(response.answer.content); useChatStore.getState().setLoading(false); + setSelectedId(undefined); } } catch (error) { useChatStore.getState().setLoading(false); diff --git a/src/ui/pages/maru-egg.tsx b/src/ui/pages/maru-egg.tsx index a6bcb6a..120180a 100644 --- a/src/ui/pages/maru-egg.tsx +++ b/src/ui/pages/maru-egg.tsx @@ -78,12 +78,6 @@ const MaruEgg: React.FC = () => { > 면접등 기출문제 - handleCategoryButtonClick('INTERVIEW_PRACTICAL_TEST')} - isSelected={selectedCategoryButton === 'INTERVIEW_PRACTICAL_TEST'} - > - 실기관련 - )}