Fix: "undefined" 클래스명 문제 해결을 위해 classnames 라이브러리 적용 #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
컴포넌트의
className
prop이undefined
일 때 "undefined" 문자열이 추가되는 문제를 해결했습니다.classnames
라이브러리를 프로젝트 의존성에 추가하였습니다.className
을 직접 조작하여 사용하던 부분을classnames
를 사용하여 리팩토링하였습니다. 이를 통해className
이undefined
인 경우 해당 값이 클래스에 포함되지 않도록 처리하였습니다.변경 전:
변경 후: