Skip to content

Commit

Permalink
fix: useEffect 다시 넣어봄 (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanglocal authored Feb 29, 2024
1 parent b171637 commit 581b609
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/app/search/_components/SearchListResult.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ function SearchListResult() {
};
}, [queryClient, sort, keyword, category]);

// useEffect(() => {
// if (!keyword)
// handleChangeSortType({
// value: 'new',
// label: searchLocale[language].new,
// });
// }, []);
useEffect(() => {
if (!keyword)
handleChangeSortType({
value: 'new',
label: searchLocale[language].new,
});
}, [keyword]);

const Result = () => {
const { language } = useLanguage();
Expand Down

0 comments on commit 581b609

Please sign in to comment.