Skip to content

Commit

Permalink
Fix: Add dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
2YH02 committed Nov 9, 2023
1 parent 2a6291d commit fb3aa74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Main/CreateGameModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,15 +212,14 @@ const CreateGameModal = ({ setModal }: Props) => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [titleInput.value]);

// 유조 검색 기능
// 유저 검색 기능
useEffect(() => {
if (users.result) {
const filter = users.result.filter((value: UserType) =>
value.name.includes(searchInput.value),
);
setUserList(filter);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [searchInput.value, users.result]);

// 게임 생성 함수
Expand Down

0 comments on commit fb3aa74

Please sign in to comment.