diff --git a/src/App.js b/src/App.js
index 791b628..e1966db 100644
--- a/src/App.js
+++ b/src/App.js
@@ -74,6 +74,8 @@ export default function App() {
//return this.setState({ email: message, createdAt: message });
}
const { nickname, email, profile_image } = res.data.data.userInfo;
+ console.log(res.data.data.accessToken)
+ setAccessToken({accessToken:res.data.data.accessToken})
setUserInfo({
nickname: nickname,
email: email,
@@ -124,6 +126,7 @@ export default function App() {
};
return (
+
{
diff --git a/src/MyPages/MyPage.js b/src/MyPages/MyPage.js
index 83d8283..0aa00fa 100644
--- a/src/MyPages/MyPage.js
+++ b/src/MyPages/MyPage.js
@@ -7,6 +7,7 @@ import Character1 from '../images/Character1.png';
import Character2 from '../images/Character2.png';
import Character3 from '../images/Character3.png';
import Character4 from '../images/Character4.png';
+import axios from 'axios';
function MyPage({ accessToken, isLogIn, loginCheck, userInfo }) {
const PhotoData = [Character1, Character2, Character3, Character4];
@@ -58,6 +59,11 @@ function MyPage({ accessToken, isLogIn, loginCheck, userInfo }) {
headers: { 'Content-Type': 'application/json' },
Credentials: 'include',
})
+ const SaveComment = await axios.post(`http://localhost:4000/mypage/${id}/comment`,
+ {
+ authorization: accessToken,
+ Comment: PhotoNum
+ })
}