Skip to content

Commit

Permalink
배포 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyemigwak committed May 26, 2021
1 parent 0b20d24 commit d20d533
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/components/MyLocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const MyLocation = (props) => {
const [longi, setLong] = useState(0); //경도
const [address, setAddress] = useState("");

const { email } = useSelector((state) => state.user.user);
const email = useSelector((state) => state.user.user);
const is_login = useSelector((state) => state.user.is_login);

const cookie = getCookie("user_login") ? true : false;
Expand Down Expand Up @@ -74,9 +74,10 @@ const MyLocation = (props) => {
}
}

getLocation();
// getLocation();

useEffect(() => {
getLocation();
if (lati && longi) {
var mapContainer = document.getElementById("map"), // 지도를 표시할 div
mapOption = {
Expand Down Expand Up @@ -162,7 +163,7 @@ const MyLocation = (props) => {
// }
// }
// }
}, [lati, longi]);
}, [lati, longi, dispatch]);

return (
<Container>
Expand Down
4 changes: 1 addition & 3 deletions src/pages/PostList.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ const PostList = (props) => {
const is_loading = useSelector((state) => state.post.is_loading);
const is_login = useSelector((state) => state.user.is_login);

const address = useSelector((state) => state.user.user.address);
console.log(address);
const address = useSelector((state) => state.user?.user?.address);

//어느 지역의 게시글들인지 보여주기
const [town, setTown] = useState("");
Expand Down Expand Up @@ -44,7 +43,6 @@ const PostList = (props) => {
confirmButtonText: "확인",
});
history.push("/mylocation");
window.location.reload();
} else {
dispatch(postActions.LogingetPostAPI());
}
Expand Down
1 change: 0 additions & 1 deletion src/redux/modules/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ const deletePostAPI = (itemId, icrId) => {
},
})
.then((res) => {
console.log(res);
if (res.data.msg === "success") {
dispatch(deletePost(itemId, icrId));
Swal.fire({
Expand Down

0 comments on commit d20d533

Please sign in to comment.