diff --git a/my-app/src/components/Mypage/EditInfoModal.js b/my-app/src/components/Mypage/EditInfoModal.js
index c2d9813..aa7acbe 100644
--- a/my-app/src/components/Mypage/EditInfoModal.js
+++ b/my-app/src/components/Mypage/EditInfoModal.js
@@ -34,12 +34,8 @@ export default class EditInfoModal extends React.Component {
}
})
.then((res) => {
- console.log("뭐가 찍히는게야",res.response)
- // if (res.status === 200) {
- // }
-
-
-
+ console.log("뭐가 찍히는게야", res.response)
+ this.props.editinfo()
})
.catch((err) => {
console.dir(err)
@@ -47,7 +43,7 @@ export default class EditInfoModal extends React.Component {
};
render() {
- // {console.log('프롭스 뱉어라',this.props)}
+ {console.log('프롭스 뱉어라',this.props)}
if (!this.props.show) {
return null
}
diff --git a/my-app/src/components/Mypage/EditInfoPasswordModal.js b/my-app/src/components/Mypage/EditInfoPasswordModal.js
index 5035eb8..e7a0bb8 100644
--- a/my-app/src/components/Mypage/EditInfoPasswordModal.js
+++ b/my-app/src/components/Mypage/EditInfoPasswordModal.js
@@ -33,7 +33,6 @@ export default class EditInfoPasswordModal extends React.Component {
};
render() {
- {console.log('프롭스 뱉어라',this.props)}
if (!this.props.show) {
return null
}
diff --git a/my-app/src/components/Mypage/Footer.js b/my-app/src/components/Mypage/Footer.js
index b1d8b93..59f1957 100644
--- a/my-app/src/components/Mypage/Footer.js
+++ b/my-app/src/components/Mypage/Footer.js
@@ -1,4 +1,8 @@
+/* eslint-disable */
import React from "react";
+import axios from "axios"
+import { Link, Route, Redirect } from "react-router-dom"
+axios.defaults.withCredentials = true;
class Footer extends React.Component {
constructor(props) {
@@ -8,10 +12,25 @@ class Footer extends React.Component {
};
}
+ handleUserRemove = () => {
+ axios({
+ method: 'post',
+ url: 'http://13.209.99.91:3001/user/remove',
+ },{withCredentials :true}
+ ).then((res) => {
+ localStorage.removeItem('isLogin')
+ console.log("삭제 된거니?",res)
+ })
+ }
+
+
render() {
return (
);
}
diff --git a/my-app/src/components/Mypage/MyToGoList.js b/my-app/src/components/Mypage/MyToGoList.js
index 14b678a..619401f 100644
--- a/my-app/src/components/Mypage/MyToGoList.js
+++ b/my-app/src/components/Mypage/MyToGoList.js
@@ -1,27 +1,34 @@
+/* eslint-disable */
import React from "react";
+const MyToGoList = (props) => {
+ return (
+
+
+ {props.post.length === 0 ? "가고 싶은 곳을 등록해주세요!" :
+ props.post.map(function (el) {
+ return (
+
+
+
{el.mapimgpath && el.mapimgpath}
+
{el.content}
+
{el.hashtags.length === 0 ? '' :
+ el.hashtags.map(function (ele) {
+ return (ele.tag)
+ })
+ }
+
+
+ )
+ })
+ }
+ {console.log(props.post)}
+
+
+ )
+}
-class MyToGoList extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- };
- }
+export default MyToGoList;
- render() {
- return (
-
-
-
-
-
내용이 들어갈 겁니다!
-
태그태그
-
-
-
- );
- }
-}
-export default MyToGoList;
\ No newline at end of file
diff --git a/my-app/src/components/Mypage/Nav.js b/my-app/src/components/Mypage/Nav.js
index 9a2e668..07cc90a 100644
--- a/my-app/src/components/Mypage/Nav.js
+++ b/my-app/src/components/Mypage/Nav.js
@@ -21,6 +21,7 @@ class Nav extends React.Component {
}
).then(res => {
console.log(res)
+ localStorage.removeItem('isLogin')
this.props.history.push("/")
}
@@ -44,6 +45,11 @@ class Nav extends React.Component {
로그아웃
+
+
+ 기능페이지
+
+
)
diff --git a/my-app/src/routes/Mypage.css b/my-app/src/routes/Mypage.css
index ef8b692..73110bf 100644
--- a/my-app/src/routes/Mypage.css
+++ b/my-app/src/routes/Mypage.css
@@ -29,11 +29,14 @@
height: 60%;
width: 10%;
border: 2px solid #937666;
- border-radius: 2px;
+ border-radius: 5px;
transform: translateY(30%);
text-align: center;
+ margin-left: 2px;
+ margin-right: 2px;
}
.Mypage_logout_btn {
+ color: #937666;
text-align: center;
}
/* 회원정보칸 */
@@ -153,15 +156,16 @@ dd {
.mypage_mylist {
position: static;
/* border: 2px solid black; */
+ height: auto;
padding-left: 55px;
padding-right: 55px;
padding-top: 20px;
padding-bottom: 20px;
- height: auto;
+
margin: 0 auto;
}
-.mypage_mycontent_box {
- height: 600px;
+.mypage_mycontent_boxs {
+ height: auto;
border: 2px solid #937666;
border-radius: 10px;
padding: 20px;
@@ -171,6 +175,7 @@ dd {
border: 2px solid #937666;
border-radius: 10px;
padding: 10px;
+ margin-bottom: 10px;
}
.mypage_mycontent_map {
width: 100%;
@@ -182,6 +187,7 @@ dd {
.mypage_mycontent_content {
width: 100%;
height: auto;
+ font-size: 12px;
border: 2px solid #937666;
border-radius: 10px;
padding: 10px;
@@ -189,6 +195,7 @@ dd {
}
.mypage_mycontent_tag {
width: 100%;
+ font-size: 12px;
height: auto;
border: 2px solid #937666;
border-radius: 10px;
@@ -197,7 +204,7 @@ dd {
/* 계정삭제 */
.mypage_deleteinfo {
position: fixed static;
- bottom: 0;
+ /* bottom: 0; */
height: 50px;
}
#delete_myinfo {
@@ -214,6 +221,7 @@ dd {
border-radius: 5px;
background: 0;
background-color: #e9ad17;
+ text-align: center;
color: #fff !important;
/* text-shadow: none; */
border: 1px solid transparent;
diff --git a/my-app/src/routes/Mypage.js b/my-app/src/routes/Mypage.js
index fce7c77..100a378 100644
--- a/my-app/src/routes/Mypage.js
+++ b/my-app/src/routes/Mypage.js
@@ -20,6 +20,7 @@ class Mypage extends React.Component{
username: '',
phonenum: '',
userInfo: '',
+ userPost: '',
editInfoCheck: false,
editInfoModalShow: false,
deleteinfoModalShow: false
@@ -46,10 +47,33 @@ class Mypage extends React.Component{
userInfo:res.data
})
console.log("나오는거야 뭐야",res)
+ })
+
+ axios({
+ method: 'get',
+ url: 'http://13.209.99.91:3001/post',
+ },{withCredentials :true}
+ ).then((res) => {
+ this.setState({
+ userPost:res.data
+ })
+ console.log("포스트 받아오니?",res)
})
}
+ editUserInfo = () => {
+ axios({
+ method: 'get',
+ url: 'http://13.209.99.91:3001/user/info',
+ },{withCredentials :true}
+ ).then((res) => {
+ this.setState({
+ userInfo:res.data
+ })
+ console.log("제발 되라",res)
+ })
+ }
//유저정보를 수정하기 위해서 비밀번호확인하는 모달창을 띄우게 할지 state 변경하는 함수
editInfoPasswordShow = e => {
@@ -68,16 +92,17 @@ class Mypage extends React.Component{
return (
+ {!localStorage.isLogin && }
{console.log('디드마운트하면 없어져? ',this.state.userInfo)}
정보를 수정하기 위해서 비밀번호를 입력해 주세요
-
+
된거냐
-
-
+
+
)
diff --git a/my-app/src/routes/Signin.js b/my-app/src/routes/Signin.js
index 47cbef6..58e3279 100644
--- a/my-app/src/routes/Signin.js
+++ b/my-app/src/routes/Signin.js
@@ -83,6 +83,7 @@ class Signin extends React.Component{
if (this.state.keepLoggedInChecked) {
localStorage.setItem('isLogin', true)
}
+ localStorage.setItem('isLogin', true)
this.props.history.push("/start");
})
// this.props.history.push("/start");
@@ -131,7 +132,7 @@ class Signin extends React.Component{
sessionStorage.setItem("userid", res.data.id)
localStorage.setItem('isLogin', true)
}
-
+ localStorage.setItem('isLogin', true)
this.props.history.push("/start");
})
@@ -151,7 +152,6 @@ class Signin extends React.Component{
return (
- {/* {console.log(this.props)} */}
{localStorage.isLogin ?
: ''}
이메일과 비밀번호를 입력해 주세요 SigninEmptyModal>