모달창이 close 될 때마다 관련 state 를 초기화해주는 함수를 호출하는데, 세개의 파일에서 동일한 함수를 추가해 쓰고 있었다.반복되는 코드를 줄이기 위해서, 함수를 새 파일로 뺀 후 컴포넌트처럼 호출해서 쓰려고 수정했더니 아래처럼 에러가 났다. Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:1. You might have mismatching versions of React and the renderer (such as React DOM)2. You might be br..