Skip to content

Commit b9c349c

Browse files
committed
fix: 지도 컴포넌트의 렌더링 문제 수정
1 parent 3e1ef95 commit b9c349c

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

  • packages/common/src/components/mdx_components

packages/common/src/components/mdx_components/map.tsx

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,26 @@ export const Map: FC<MapPropType> = ({ geo, placeName, placeCode, googleMapIfram
7777

7878
const kakaoMapUrl = MapData.kakao.basePlaceInfoUrl + placeCode.kakao;
7979
const content: string = renderToStaticMarkup(
80-
<a href={kakaoMapUrl} target="_blank" rel="noopener noreferrer" style={{ width: "max-content", height: "max-content" }}>
81-
<div
82-
style={{
83-
width: "100%",
84-
height: "100%",
85-
textAlign: "center",
86-
fontSize: "18px",
87-
whiteSpace: "pre-wrap",
88-
textWrap: "nowrap",
89-
}}
90-
>
91-
{placeName[language]}
92-
</div>
93-
</a>
80+
<a
81+
href={kakaoMapUrl}
82+
target="_blank"
83+
rel="noopener noreferrer"
84+
style={{
85+
display: "inline-block",
86+
boxSizing: "border-box",
87+
width: "max-content",
88+
maxWidth: "240px",
89+
padding: "8px 12px",
90+
textAlign: "center",
91+
fontSize: "20px",
92+
lineHeight: 1.4,
93+
whiteSpace: "normal",
94+
wordBreak: "keep-all",
95+
color: "#000",
96+
textDecoration: "none",
97+
}}
98+
children={placeName[language]}
99+
/>
94100
);
95101
const position = new window.kakao.maps.LatLng(geo.lat, geo.lng);
96102
const map = new window.kakao.maps.Map(kakaoMapDiv, { center: position, level: 3 });

0 commit comments

Comments
 (0)