[UNI-267] refactor : createMarkerElement 재 함수화 및 적용#167
Conversation
…MarkerElementWithName 변경
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
jpark0506
left a comment
There was a problem hiding this comment.
LGTM~ 고생하셨습니다!! 변경하신 코드에 리팩토링해보겠습니다
| const markerElement = createMarkerElement({ | ||
| type: Markers.DANGER, | ||
| className: "translate-pinmarker", | ||
| className: "translate-shadowmarker", |
| const waypointMarkerElement = ({ className }: MarkerProps) => { | ||
| const containerElement = createContainerElement(`translate-waypoint ${className}`); | ||
|
|
||
| const imageElement = createImageElement(Markers.WAYPOINT); | ||
|
|
||
| containerElement.appendChild(imageElement); | ||
|
|
||
| return containerElement; | ||
| }; | ||
|
|
||
| return { | ||
| dangerMarkerElement, | ||
| cautionMarkerElement, | ||
| buildingMarkerElement, | ||
| selectedBuildingMarkerElement, | ||
| originMarkerElementWithName, | ||
| destinationMarkerElementWithName, | ||
| originMarkerElement, | ||
| destinationMarkerElement, | ||
| reportMarkerElement, | ||
| waypointMarkerElement, |
There was a problem hiding this comment.
함수 분리로 비즈니스 코드가 깔끔해졌네요! 고생하셨습니다!
📝 PR 타입
🚀 변경 사항
createMarkerElement 리팩토링
createMarkerElement함수를 리팩토링 하였습니다.createMarkerElement에 마커의 타입, 이름 등 정보를 입력하여 다양한 종류의 마커를 생성하던 과정을 각 종류별 마커를 생성하는 독립 함수로 분리하였습니다마커 className 재정의
💡 To Reviewer