Skip to content

Commit 3207a23

Browse files
committed
feat : star는 표시되나, 클릭이 안되는 상황
1 parent 1eed3a6 commit 3207a23

File tree

5 files changed

+23
-1
lines changed

5 files changed

+23
-1
lines changed

yam-view/src/assets/emptyStar.png

471 Bytes
Loading

yam-view/src/assets/fullStar.png

384 Bytes
Loading

yam-view/src/components/Data/markerData.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const dummyData = [
3434
x_coordinate: 127.16017523675508, // 경도
3535
address: "대전광역시 00구 00동",
3636
heart: 3,
37+
star: true,
3738
category: "korea",
3839
menus: [
3940
{
@@ -53,6 +54,7 @@ export const dummyData = [
5354
x_coordinate: 127.1583774403176, // 경도
5455
address: "대전광역시 00구 00동",
5556
heart: 3,
57+
star: true,
5658
category: "cafe",
5759
menus: [
5860
{
@@ -72,6 +74,7 @@ export const dummyData = [
7274
x_coordinate: 127.15122688059974, // 경도
7375
address: "대전광역시 00구 00동",
7476
heart: 3,
77+
star: false,
7578
category: "japan",
7679
menus: [
7780
{
@@ -91,6 +94,7 @@ export const dummyData = [
9194
x_coordinate: 127.15211256646381, // 경도
9295
address: "대전광역시 00구 00동",
9396
heart: 3,
97+
star: false,
9498
category: "china",
9599
menus: [
96100
{

yam-view/src/pages/WebView.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
font-weight: lighter;
166166
border-radius: 10px;
167167
font-size: 12px;
168-
margin-right: 10px;
168+
margin-right: 40px;
169169
}
170170

171171
.content{
@@ -208,4 +208,9 @@
208208

209209
.bold{
210210
font-weight: bold;
211+
}
212+
213+
.star{
214+
position : absolute;
215+
right: 15px;
211216
}

yam-view/src/pages/WebView.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ const WebView = () => {
169169
<div class="sector">
170170
${findCategoryEtoK(el.category)}
171171
</div>
172+
<div class='star'>
173+
<imglocation>
174+
</div>
172175
</div>
173176
<div class="body">
174177
<div class="content">
@@ -205,6 +208,16 @@ const WebView = () => {
205208
</div>
206209
</div>
207210
</div>;`;
211+
212+
let starImg = document.createElement("img");
213+
starImg.className = "starImg";
214+
if (el.star) {
215+
starImg.src = require("../assets/fullStar.png");
216+
} else {
217+
starImg.src = require("../assets/emptyStar.png");
218+
}
219+
content = content.replace("<imglocation>", `${starImg.outerHTML}`);
220+
208221
/* 위 div 방식을 아래처럼 바꿔야할 것 같아요
209222
var content = document.createElement('div');
210223
content.setAttribute('class','wrap');

0 commit comments

Comments
 (0)