diff --git a/src/components/Board/BoardFreeWrite.js b/src/components/Board/BoardFreeWrite.js index 4767a00..f9a304c 100644 --- a/src/components/Board/BoardFreeWrite.js +++ b/src/components/Board/BoardFreeWrite.js @@ -88,6 +88,7 @@ const BoardFreeWrite = () => { position: 'relative', top: '80px', right: '600px', + zIndex: '1', }} id='attachedFile' ref={fileInput} diff --git a/src/components/Bupbong/Bupbong.js b/src/components/Bupbong/Bupbong.js index e7dc60f..9d2bd8d 100644 --- a/src/components/Bupbong/Bupbong.js +++ b/src/components/Bupbong/Bupbong.js @@ -74,7 +74,7 @@ const Bupbong = (effect, deps) => { const amount = parseInt(amountStr.replace(/,/g, ''), 10); - IMP.init([['imp42507411']]); + IMP.init('imp42507411'); const datas = { pg: 'tosspayment', pay_method: 'card', diff --git a/src/components/JoinList/JoinList.js b/src/components/JoinList/JoinList.js index d407659..f469905 100644 --- a/src/components/JoinList/JoinList.js +++ b/src/components/JoinList/JoinList.js @@ -78,7 +78,7 @@ const JoinList = ({ setPBtnCnt, currentPage, onPageChange }) => { }; useEffect(() => { - if (loggedUser.mode == 'user' || loggedUser.mode == 'lawyer') { + if (loggedUser.mode !== 'master') { alert('페이지 접근 권한이 없습니다.'); navigate('/'); } else { diff --git a/src/components/Login/LoginForm.js b/src/components/Login/LoginForm.js index a3a02f4..62806bb 100644 --- a/src/components/Login/LoginForm.js +++ b/src/components/Login/LoginForm.js @@ -54,18 +54,23 @@ const LoginForm = ({ mode, setMode }) => { }); if (res.status === 200) { - if (loggedUser.mode === 'master') { - console.log(loggedUser.mode); - console.log('master로그인'); + const data = await res.json(); + // 관리자 처리 + if (data.authority === 'master') { + console.log('master 로그인'); + const userInfo = { id: data.id, name: 'master', mode: data.authority }; + dispatch(setUser(userInfo)); navigate('/joinList/'); return; } - const data = await res.json(); + localStorage.setItem('accessToken', data.accessToken); + // 미승인 변호사 처리 const userInfo = { id: data.id, name: data.name, mode: data.authority }; if (data.authority === 'notApproval') { alert('미승인 상태의 변호사는 접근 권한이 제한될 수 있습니다.'); } + // 그외 로그인 성공 처리 dispatch(setUser(userInfo)); } else { const text = await res.text(); diff --git a/src/components/MainPage.js b/src/components/MainPage.js index 7d34474..0566221 100644 --- a/src/components/MainPage.js +++ b/src/components/MainPage.js @@ -45,6 +45,12 @@ const MainPage = () => { dispatch(logout()); alert('로그아웃 되었습니다.'); navigate('/'); + } else if (res.status === 500) { + console.log('소셜 로그인 로그아웃 처리 오류'); + localStorage.clear(); + dispatch(logout()); + alert('로그아웃 되었습니다.'); + navigate('/'); } } catch (error) { console.error('로그아웃 에러:', error); diff --git a/src/components/scss/Board.scss b/src/components/scss/Board.scss index fed363d..9416704 100644 --- a/src/components/scss/Board.scss +++ b/src/components/scss/Board.scss @@ -390,6 +390,9 @@ width: calc(100vw / 1.14); flex-direction: row-reverse; margin-top: 20px; + position: relative; + right: 120px; + top: 50px; .board-write-btn { width: 171px; height: 43px; diff --git a/src/config/host-config.js b/src/config/host-config.js index e749980..083de56 100644 --- a/src/config/host-config.js +++ b/src/config/host-config.js @@ -2,7 +2,7 @@ const clientHostName = window.location.hostname; // let backEndHostName = 'http://localhost:80'; -let backEndHostName = "http://54.180.52.142"; // 백엔드 서버 호스트 이름 +let backEndHostName = 'http://54.180.52.142'; // 백엔드 서버 호스트 이름 // if (clientHostName === 'localhost') { // console.log('clientHostName는 : ', clientHostName); @@ -19,7 +19,7 @@ let backEndHostName = "http://54.180.52.142"; // 백엔드 서버 호스트 이 // backEndHostName = 'http://15.164.178.169'; // ec2 의 도메인주소가 들어와야 함. // } -export const API_BASE_URL = backEndHostName + "/api"; +export const API_BASE_URL = backEndHostName + '/api'; // export const USER = "/api/user"; // export const LAWYER = "/api/lawyer"; // export const MYPAGE = "/api/mypage";