Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[client] / #11,13,14,15 / Fix Mypage Layout #74

Merged
merged 1 commit into from
Nov 19, 2020
Merged
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
24 changes: 12 additions & 12 deletions my-app/src/components/Func_page/modal/NavMenuModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ export default class NavMenuModal extends React.Component {
}

handleLogout() {
axios({
method: 'post',
url: 'http://13.209.99.91:3001/user/signout',
}
).then(res => {
console.log(res)
localStorage.removeItem('isLogin')
this.props.history.push("/")
}
// axios({
// method: 'post',
// url: 'http://13.209.99.91:3001/user/signout',
// }
// ).then(res => {
// console.log(res)
// localStorage.removeItem('isLogin')
// this.props.history.push("/")
// }

).catch((err) => {
console.log(err)
// ).catch((err) => {
// console.log(err)


})
// })
}


Expand Down
3 changes: 3 additions & 0 deletions my-app/src/components/Mypage/EditInfoModal.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,22 @@
.editinfo_username {
margin-bottom: 0px;
float: left;
margin-right: 70px;
}
.input_username {
width: 50%;
}
.editinfo_phonenum {
float: left;
margin-right: 20px;
}

.input_tel {
width: 50%;
}
.editinfo_password {
float: left;
margin-right: 40px;
}
.input_edit_password {
width: 50%;
Expand Down
2 changes: 1 addition & 1 deletion my-app/src/components/Mypage/EditInfoModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default class EditInfoModal extends React.Component {
console.log('patch합니다')
axios({
method: 'patch',
url: 'http://13.209.99.91:3001/user/editinfo',
url: 'https://togolist-server.ml/user/editinfo',
data: {
phonenum,
username,
Expand Down
4 changes: 2 additions & 2 deletions my-app/src/components/Mypage/EditInfoPasswordModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class EditInfoPasswordModal extends React.Component {
constructor(props) {
super(props)
this.state = {
password : ''
password : null
}
this.CheckUserPassword = this.CheckUserPassword.bind(this)
}
Expand All @@ -16,7 +16,7 @@ export default class EditInfoPasswordModal extends React.Component {
const { password } = this.state
axios({
method: 'post',
url: 'http://13.209.99.91:3001/user/checkpwd',
url: 'https://togolist-server.ml/user/checkpwd',
data: {
password: password
}
Expand Down
5 changes: 3 additions & 2 deletions my-app/src/components/Mypage/UserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ class UserInfo extends React.Component {
</dl>
</div>
</div>
</div>
</div>
</div>
<div className="mypage_profile_edit">
<button id="mypage_edit_btn" onClick={() => this.props.passwordcheck()}>편집</button>
</div>
</div>

</div>
</div>
);
Expand Down
29 changes: 19 additions & 10 deletions my-app/src/routes/Mypage.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.page_sort {
justify-content: center;
}
.mypage_page {
display: block;
/* border: 2px solid black; */
Expand All @@ -10,8 +13,8 @@
height: 50px;
top: 0;
width: 100vw;
padding-left: 42px;
padding-right: 42px;
padding-left: 10%;
padding-right: 10%;
background-color: #e9ad17;
}
.mypage_logo_box {
Expand All @@ -25,17 +28,20 @@
}
.Mypage_logout_btn_box {
float: right;
min-width: 80px;
display: inline-block;
height: 60%;
width: 10%;
width: 5%;
border: 2px solid #937666;
border-radius: 5px;
transform: translateY(30%);
text-align: center;
margin-left: 2px;
margin-right: 2px;
padding: 2px;
}
.Mypage_logout_btn {
font-size: 12px;
color: #937666;
text-align: center;
}
Expand All @@ -45,25 +51,26 @@
position: static;
top: 0;
align-content: center;
padding-left: 55px;
padding-right: 55px;
padding-left: 10%;
padding-right: 10%;
padding-top: 20px;
padding-bottom: 20px;
}
.mypage_userinfo_frame {
height: 300px;
border: 2px solid #937666;
border-radius: 10px;
padding-left: 20px;
padding: 20px;
height: auto;
min-width: 720px;
}
.mypage_userinfo_content_box {
overflow: hidden;
/* border: 2px solid black; */
height: auto;
padding: 20px;
}

.mypage_profile_photo {
/* box-sizing: border-box; */
overflow: hidden;
Expand Down Expand Up @@ -133,18 +140,19 @@ dd {
.mypage_profile_edit {
position: static;
width: 100%;
height: 36px;
}
#mypage_edit_btn {
float: right;
cursor: pointer;
text-align: center;
display: block;
/* display: block; */
height: auto;
width: 20%;
font-size: 13px !important;
font-weight: 700;
padding: 9px 12px;
box-sizing: border-box;
/* box-sizing: border-box; */
border-radius: 5px;
background: 0;
background-color: #e9ad17;
Expand All @@ -157,8 +165,8 @@ dd {
position: static;
/* border: 2px solid black; */
height: auto;
padding-left: 55px;
padding-right: 55px;
padding-left: 10%;
padding-right: 10%;
padding-top: 20px;
padding-bottom: 20px;

Expand All @@ -169,6 +177,7 @@ dd {
border: 2px solid #937666;
border-radius: 10px;
padding: 20px;
min-width: 720px;
}
.mypage_mycontent_frame {
height: auto;
Expand Down
25 changes: 13 additions & 12 deletions my-app/src/routes/Mypage.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ class Mypage extends React.Component{
componentDidMount() {
console.log("didmount중입니다")

// axios.get('http://13.209.99.91:3001/user/info', {
// headers: {
// Accept : "application/json, text/plain, */*"
// }
// }).then(response => {
// console.log(response)
// })
axios.get('https://togolist-server.ml/user/info', {
headers: {
Accept : "application/json, text/plain, */*"
}
}).then(response => {
console.log('너는 뭔냐???????????',response)
})

axios({
method: 'get',
url: 'http://13.209.99.91:3001/user/info',
url: 'https://togolist-server.ml/user/info',
},{withCredentials :true}
).then((res) => {
this.setState({
Expand All @@ -51,7 +51,7 @@ class Mypage extends React.Component{

axios({
method: 'get',
url: 'http://13.209.99.91:3001/post',
url: 'https://togolist-server.ml/post',
},{withCredentials :true}
).then((res) => {
this.setState({
Expand All @@ -65,7 +65,7 @@ class Mypage extends React.Component{
editUserInfo = () => {
axios({
method: 'get',
url: 'http://13.209.99.91:3001/user/info',
url: 'https://togolist-server.ml/user/info',
},{withCredentials :true}
).then((res) => {
this.setState({
Expand All @@ -90,7 +90,7 @@ class Mypage extends React.Component{

render(){
return (

<div className="page_sort">
<div className="mypage_page">
{!localStorage.isLogin && <Redirect to="/" />}
{console.log('디드마운트하면 없어져? ',this.state.userInfo)}
Expand All @@ -104,7 +104,8 @@ class Mypage extends React.Component{
<UserInfo passwordcheck={this.editInfoPasswordShow} userinfo={this.state.userInfo} />
<MyToGoList post={this.state.userPost }/>
<Footer />
</div>
</div>
</div>
)
}
}
Expand Down
12 changes: 4 additions & 8 deletions my-app/src/routes/Signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,14 @@ class Signin extends React.Component{
email: res.profileObj.email,
googletoken: res.tokenId
})
console.log("너 제대로 집어 넣는거 맞냐?",this.state.googletoken)
axios({
method: 'post',

url: 'http://13.209.99.91:3001/user/google',
url: 'https://togolist-server.ml/user/google',

data: {
// googleId : id,
// email: email,
// username: name,
tokenId: googletoken
tokenId: res.tokenId
}
})
.then((data) => {
Expand All @@ -86,7 +84,6 @@ class Signin extends React.Component{
localStorage.setItem('isLogin', true)
this.props.history.push("/start");
})
// this.props.history.push("/start");
}

responseFail = (err) => {
Expand Down Expand Up @@ -115,10 +112,9 @@ class Signin extends React.Component{
if (!email || !password) {
this.setState({show: true})
}

axios({
method: 'post',
url: 'http://13.209.99.91:3001/user/signin',
url: 'https://togolist-server.ml/user/signin',
data: {
email,
password
Expand Down