From 2570ebc952558c07303e927b93ee6c442977887a Mon Sep 17 00:00:00 2001 From: sohhhyeeun Date: Mon, 18 Dec 2023 11:12:50 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20=EC=B9=B4=ED=85=8C=EA=B3=A0=EB=A6=AC=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 2 +- src/components/layout/Main.js | 2 +- src/components/posts/SearchPost.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/App.js b/src/App.js index 2259132..335a279 100644 --- a/src/App.js +++ b/src/App.js @@ -71,7 +71,7 @@ function App() { } /> } /> } /> - } /> + } /> } /> }> } /> diff --git a/src/components/layout/Main.js b/src/components/layout/Main.js index 9ee84fe..7a056dc 100644 --- a/src/components/layout/Main.js +++ b/src/components/layout/Main.js @@ -22,7 +22,7 @@ function Main() { const handleSearch = () => { setIsSearching(true); - navigate(`/post/search?category=${encodeURIComponent(category)}&searchWord=${encodeURIComponent(searchWord)}`); // 검색 결과 페이지로 이동 + navigate(`/post/categorySearch?category=${encodeURIComponent(category)}&searchWord=${encodeURIComponent(searchWord)}`); // 검색 결과 페이지로 이동 }; const snowflakes = Array.from({ length: 100 }).map((_, index) => ( diff --git a/src/components/posts/SearchPost.js b/src/components/posts/SearchPost.js index de4a685..273c206 100644 --- a/src/components/posts/SearchPost.js +++ b/src/components/posts/SearchPost.js @@ -30,7 +30,7 @@ function SearchPost({ setIsSearching }) { const searchWordParam = params.get('searchWord'); setLoading(false); - const res = await axios.get(`${process.env.REACT_APP_HOST_URL}/api/v1/post/search?category=${categoryParam}&searchWord=${searchWordParam}&page=${pageNumber}`, { + const res = await axios.get(`${process.env.REACT_APP_HOST_URL}/api/v1/post/categorySearch?category=${categoryParam}&searchWord=${searchWordParam}&page=${pageNumber}`, { headers: { Authorization: `Bearer ${authToken}`, },