Skip to content

Commit 8e528a0

Browse files
committed
[fix] index오류 해결
1 parent b80c403 commit 8e528a0

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/components/CarouselCard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const Carousel = ({ items, setHeight }) => {
1414
const clickItem = (item, idx, categoryParts) => {
1515
setHeight(500);
1616
const selected = {
17-
id: item.id,
17+
id: item.restaurantId,
1818
lat: Number(item.y),
1919
lng: Number(item.x),
2020
image: item.imageUrl,

src/data/dummyStores.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const dummyStores = [
3131
lastStampedAt: "2025-07-06 09:10",
3232
},
3333
{
34-
id: "16",
34+
id: "1",
3535
name: "구름식당",
3636
stampCount: 4,
3737
lastStampedAt: "2025-07-06 09:10",

src/pages/Main.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const Main = () => {
103103
if (selectedLocation && selectedLocation.id) {
104104
console.log(selectedLocation.id);
105105
const foundIdx = dummyStores.findIndex(
106-
(store) => store.id === selectedLocation.id.toString()
106+
(store) => store.id === selectedLocation.id
107107
);
108108
if (foundIdx !== -1) {
109109
setSelectedSearchStoreIdx(foundIdx);
@@ -176,6 +176,7 @@ const Main = () => {
176176
};
177177

178178
const clickItem = (item, categoryParts) => {
179+
console.log(item);
179180
setSearching(false);
180181
setInitialHeight(500);
181182
const selected = {
@@ -188,6 +189,7 @@ const Main = () => {
188189
subtitle: item.subtitle,
189190
image_url: item.imageUrl,
190191
};
192+
console.log(selected);
191193
setSelectedLocation(selected);
192194
console.log("🔍 클릭한 장소:", selected);
193195
};

0 commit comments

Comments
 (0)