Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function App() {
<Route path="/welcome" element={<Welcome/>} />
<Route path="/parks/:parkId" element={<ParkComment />} />
<Route path="/parks/:parkId/comment" element={<ParkCommentForm />} />
<Route path="/post/search" element={<SearchPost />} />
<Route path="/post/categorySearch" element={<SearchPost />} />
<Route path="/post/hashtagSearch" element={<HashtagSearch />} />
<Route path="/admin/reports" element={<ReportsPage />}>
<Route path="posts" element={<ReportedPosts />} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/posts/SearchPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
},
Expand Down