Skip to content

Commit

Permalink
refactor: 불필요한 주석 및 코드 제거로 PostsPresent 컴포넌트 정리
Browse files Browse the repository at this point in the history
  • Loading branch information
biud436 committed Jan 1, 2025
1 parent 1790708 commit d30c214
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/components/post/list/PostsPresent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,8 @@ export const PostsPresent = observer(() => {
const postsStore = usePostsStore();
const pageNumber = postsStore.getPageNumber();
const categoryId = categoryService.getCurrentMenuCategoryId();
// const searchProperty = postsStore.getSearchType();
// const searchQuery = postsStore.getSearchQuery();

const { data, isLoading } = usePosts();
// const { data, isLoading } = useSWR<BlogServerResponse<PostEntity>['data']>(
// ['/posts/posts', pageNumber, categoryId],
// fetcher,
// );

// function fetcher() {
// if (postsStore.isSearchMode()) {
// const url = `/posts/search?pageNumber=${pageNumber}&searchProperty=${searchProperty}&searchQuery=${encodeURIComponent(
// searchQuery ?? '',
// )}`;

// return axios.get(url).then(res => res.data.data);
// } else {
// const url = `/posts?page=${pageNumber}&categoryId=${categoryId}`;
// return axios.get(url).then(res => res.data.data);
// }
// }

const fetchData = async (page?: number) => {
try {
Expand Down

0 comments on commit d30c214

Please sign in to comment.