No changes needed
The AI edits didn't result in any changes to the codebase.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
import React, { useEffect, useState } from 'react';
|
import React from 'react';
|
||||||
import { Badge } from '@/components/ui/badge';
|
import { Badge } from '@/components/ui/badge';
|
||||||
import { getPersonalizedTitleSuggestions } from '@/utils/userTitlePreferences';
|
import { getPersonalizedTitleSuggestions } from '@/utils/userTitlePreferences';
|
||||||
|
|
||||||
@@ -14,15 +14,7 @@ const ExpenseTitleSuggestions: React.FC<ExpenseTitleSuggestionsProps> = ({
|
|||||||
showSuggestions,
|
showSuggestions,
|
||||||
onSuggestionClick
|
onSuggestionClick
|
||||||
}) => {
|
}) => {
|
||||||
const [titleSuggestions, setTitleSuggestions] = useState<string[]>([]);
|
const titleSuggestions = getPersonalizedTitleSuggestions(category);
|
||||||
|
|
||||||
// 카테고리가 변경될 때마다 개인화된 제목 목록 업데이트
|
|
||||||
useEffect(() => {
|
|
||||||
if (category) {
|
|
||||||
const suggestions = getPersonalizedTitleSuggestions(category);
|
|
||||||
setTitleSuggestions(suggestions);
|
|
||||||
}
|
|
||||||
}, [category]);
|
|
||||||
|
|
||||||
if (!category || titleSuggestions.length === 0) {
|
if (!category || titleSuggestions.length === 0) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user