Skip to content

Commit

Permalink
fix: 북마크 렌더링 시점 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Songhyejeong committed Nov 17, 2024
1 parent 4c7bc0e commit d1b45b7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/common/bookmark/BookmarkContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ const BookmarkContainer = ({ bookmarkId, storeId }) => {
if (response.status === 204) {
console.log('success delete');
fetchBookmarkStores();
navigate(0);
}
} else {
const response = await postBookmarkStore(storeId);
if (response.status === 201) {
fetchBookmarkStores();
navigate(0);
} else {
console.log(response.error);
}
Expand All @@ -51,6 +49,7 @@ const BookmarkContainer = ({ bookmarkId, storeId }) => {
if (response.status === 200) {
const newData = response.data;
setBookmarkStore([...newData]);
navigate(0);
} else {
navigate('/login');
}
Expand Down

0 comments on commit d1b45b7

Please sign in to comment.