From 71fdb8a7e01b3a06bd7e38e5a943f8747e40efbc Mon Sep 17 00:00:00 2001 From: Sanghyeon Sim <5338095@gmail.com> Date: Sat, 2 Sep 2023 13:31:28 +0900 Subject: [PATCH] chore: version 1.0.5 --- package.json | 2 +- source/Search.js | 7 ++++++- source/component/EachShop.js | 4 ++-- source/component/ShopDetail.js | 3 ++- source/component/ShopPost.js | 11 +++++++---- 5 files changed, 18 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 96711dc..27636eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "up-d4te", - "version": "1.0.4", + "version": "1.0.5", "description": "Recommend Dating Course in Korea with CLI", "author": { "name": "Sanghyeon Sim", diff --git a/source/Search.js b/source/Search.js index ce85ea7..127b3d1 100644 --- a/source/Search.js +++ b/source/Search.js @@ -114,7 +114,12 @@ const Search = ({setlist, setStation, setId, setStoreName, setSingleShop}) => { return; } if(search === 'girlfriend') { - setlist(list => [...list, [['Not Found.'], search]]); + setlist(list => [...list, [['404 Not Found.'], search]]); + setSearch(''); + return; + } + if(search === 'boyfriend') { + setlist(list => [...list, [['404 Not Found.'], search]]); setSearch(''); return; } diff --git a/source/component/EachShop.js b/source/component/EachShop.js index 8314ab3..f87a5ea 100644 --- a/source/component/EachShop.js +++ b/source/component/EachShop.js @@ -30,9 +30,9 @@ const EachShop = ({data, key, isEnd}) => { {'['} {data.menu.map((item, index, array) => ( - + {' '} - {'{'} "{item.menuName}" : {item.menuPrice} {'}'} + {'{'} "{item.name}" : {item.price} {'}'} {index !== array.length - 1 ? ',' : ''} diff --git a/source/component/ShopDetail.js b/source/component/ShopDetail.js index 20e60be..630addc 100644 --- a/source/component/ShopDetail.js +++ b/source/component/ShopDetail.js @@ -141,7 +141,7 @@ const ShopView = ({data, reviewlist}) => { "menu" : {'['} {data.menu.map((item, index, array) => ( - + {' '} {'{'} "{item.menuName}" : {item.menuPrice} {'}'} {index !== array.length - 1 ? ',' : ''} @@ -164,6 +164,7 @@ const ShopView = ({data, reviewlist}) => { {reviewlist.map((item, index) => ( { const response = await fetchKakaoShops(shopTitle, category); setKakaoShops(response.data['documents']); if (response.data['documents'].length == 0) return; - setLatitude(kakaoShops[0].y); - setLongitude(kakaoShops[0].x); - setPhoneNumber(kakaoShops[0].phone); - setPlaceUrl(kakaoShops[0].place_url); + setLatitude(response.data['documents'][0].y); + setLongitude(response.data['documents'][0].x); + setPhoneNumber(response.data['documents'][0].phone); + setPlaceUrl(response.data['documents'][0].place_url); + // setLongitude(kakaoShops[0].x); + // setPhoneNumber(kakaoShops[0].phone); + // setPlaceUrl(kakaoShops[0].place_url); setSelectedShopIndex(0); };