Skip to content

Commit

Permalink
Merge pull request #36 from MARU-EGG/hot-fix
Browse files Browse the repository at this point in the history
hot-fix
  • Loading branch information
swgvenghy authored Aug 19, 2024
2 parents 8e3e0db + 9aa092c commit 5aff497
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/api/search-auto-complete.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { server_axiosInstance } from '../utils/axios';

export async function searchAutoComplete(content: string): Promise<any> {
export async function searchAutoComplete(content: string, category?: string, type?: string): Promise<any> {
try {
const response = await server_axiosInstance.get('/api/questions/search', {
params: {
content: content,
size: 5,
type: type,
category: category,
},
});
return response.data;
Expand Down
1 change: 1 addition & 0 deletions src/ui/components/molecule/chat-form/chat-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 0 additions & 6 deletions src/ui/pages/maru-egg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ const MaruEgg: React.FC = () => {
>
면접등 기출문제
</PresetButton>
<PresetButton
onClick={() => handleCategoryButtonClick('INTERVIEW_PRACTICAL_TEST')}
isSelected={selectedCategoryButton === 'INTERVIEW_PRACTICAL_TEST'}
>
실기관련
</PresetButton>
</div>
</>
)}
Expand Down

0 comments on commit 5aff497

Please sign in to comment.