Skip to content

Commit

Permalink
Merge pull request SOLUX-high5ive#34 from SOLUX-high5ive/yeonjin
Browse files Browse the repository at this point in the history
수정
  • Loading branch information
C2hazelnut authored Feb 6, 2024
2 parents 57d7775 + bb71cf3 commit 8bc1e8b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/pages/BoardPages/DetailPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,17 @@ const DetailPage = () => {
setProfile(serverDomain + profpath);
handleBtn(res.data.author.nickname);

console.log(2024 - parseInt(post.birth_date.substr(0, 4)));
console.log(2024 - parseInt(res.data.author.birth_date.substr(0, 4)));

setAge(2024 - parseInt(post.birth_date.substr(0, 4)));
setAge(2024 - parseInt(res.data.author.birth_date.substr(0, 4)));
})
.catch(err => {
console.error('get detail error', err);
})
}

const handleBtn = (nickname) => {
//글사용자와 현재 사용자의 닉네임이 같으면
//localStorage 닉네임 받아오기
if(nickname === "눈송"){
console.log("참");
setIsTrue(true);
Expand Down Expand Up @@ -348,7 +348,6 @@ const DetailPage = () => {
useEffect(() => {
console.log(state);
getDetail();

},[]);

return (
Expand Down

0 comments on commit 8bc1e8b

Please sign in to comment.