From 86914046951182b7c017a294240491bedbe095ea Mon Sep 17 00:00:00 2001 From: yongaricode Date: Thu, 15 May 2025 16:31:07 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=95=88=ED=96=88=EC=9D=84=20=EB=95=8C=EB=8A=94=20=EC=B5=9C?= =?UTF-8?q?=EA=B7=BC=20=EA=B2=80=EC=83=89=EC=96=B4=20=EC=9A=94=EC=B2=AD=20?= =?UTF-8?q?=EC=95=88=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Booksnap/BookSearch.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/Booksnap/BookSearch.tsx b/src/pages/Booksnap/BookSearch.tsx index a2be2e5..0151c5a 100644 --- a/src/pages/Booksnap/BookSearch.tsx +++ b/src/pages/Booksnap/BookSearch.tsx @@ -13,11 +13,14 @@ const BookSearch = () => { const bookname = ['구원의 날', '지구에서 한아뿐', '사이키쿠스오']; const [recent, setRecent] = useState([]); const [word, setWord] = useState(''); + const isLogin = !!localStorage.getItem('accessToken'); useEffect(() => { - getRecentSearch('booktitle', 1, 10).then((data) => { - setRecent(data.data.searchHistory); - }); + if (isLogin) { + getRecentSearch('booktitle', 1, 10).then((data) => { + setRecent(data.data.searchHistory); + }); + } }, []); const handleClick = (bookName: string) => { From 0ad46d921082f36f8459b75c3bc7b9c27d961bbf Mon Sep 17 00:00:00 2001 From: yongaricode Date: Thu, 15 May 2025 16:36:47 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EB=B0=B1=EC=97=94=EB=93=9C=20query?= =?UTF-8?q?=20=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/zip.api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/zip.api.ts b/src/api/zip.api.ts index a21ee85..11e9a32 100644 --- a/src/api/zip.api.ts +++ b/src/api/zip.api.ts @@ -4,7 +4,7 @@ import instance from './instance'; // 서점 검색 export const searchBookstore = async (name: string, lat: number, lng: number) => { try { - const response = await instance.get(`/api/bookstores/search?keyword=${name}&lat=${lat}&lng=${lng}`); + const response = await instance.get(`/api/bookstores/search?searchK=${name}&lat=${lat}&lng=${lng}`); if (response.status == 200) { return response.data; }