Skip to content

Commit

Permalink
path추가
Browse files Browse the repository at this point in the history
  • Loading branch information
OkSangSoo authored and okps123 committed May 15, 2023
1 parent 26c100a commit 3dde171
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 19 deletions.
4 changes: 2 additions & 2 deletions front-end/timepay-user/src/components/Menu/BaseMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { Link } from 'react-router-dom';

const items = [
{
label: <Link to="/inquiry">문의하기</Link>,
label: <Link to="/qna/register">문의하기</Link>,
key: 'inquiry',
},
{
label: <Link to="/inquiry-details">문의내역</Link>,
label: <Link to="/qna/main">문의내역</Link>,
key: 'inquiry-details',
},
{
Expand Down
5 changes: 3 additions & 2 deletions front-end/timepay-user/src/pages/MainPage/ProfileEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useCallback, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import { useSetRecoilState } from 'recoil';
import { headerTitleState } from '../../states/uiState';
import { PATH } from '../../utils/paths';
import Profile from '../../assets/images/profile.svg';
import BackBtn from '../../assets/images/BackBtn.svg';
import { BottomSheet } from 'react-spring-bottom-sheet'
Expand Down Expand Up @@ -31,7 +32,7 @@ const ProfileEdit = () => {
<>
<div className="unregist-page">
<div className='main-header'>
<img src={BackBtn} alt="" style={{ float: "left" }} />
<img src={BackBtn} alt="" style={{ float: "left" }} onClick={() => handleOnClickLinkBtn(PATH.MAIN)} />
내정보 수정
</div>
<div className='edit-body'>
Expand Down Expand Up @@ -63,7 +64,7 @@ const ProfileEdit = () => {
</div>
</div>
<div className='finish-btn' style={{textAlign:"center"}}>
<button style={{marginTop:"50%"}}>수정완료</button>
<button style={{marginTop:"50%"}} onClick={() => handleOnClickLinkBtn(PATH.MAIN)}>수정완료</button>
</div>
</div>
<BottomSheet open={open}>
Expand Down
2 changes: 1 addition & 1 deletion front-end/timepay-user/src/pages/MainPage/Unregistal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Unregistal = () => {
<>
<div className="unregist-page">
<div className='main-header'>
<img src={BackBtn} alt="" style={{ float: "left" }} />
<img src={BackBtn} alt="" style={{ float: "left" }} onClick={() => handleOnClickLinkBtn(PATH.MAIN)} />
탈퇴하기
</div>
<div className='regist-body'>
Expand Down
17 changes: 10 additions & 7 deletions front-end/timepay-user/src/pages/MainPage/UserMainPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Fav from '../../assets/images/fav.svg';
import { PATH } from '../../utils/paths';
import BaseMenu from '../../components/Menu/BaseMenu';
import { Tooltip } from 'antd';

import axios from 'axios';
import { Dropdown } from 'antd';
import type { MenuProps } from 'antd';

Expand All @@ -18,8 +18,11 @@ import type { MenuProps } from 'antd';
const UserMainPage = () => {
const navigate = useNavigate();
const [title, setTitle] = useState<String>("정릉지점");
const [accountNum, setAccountNum] = useState<String>("계좌번호 000-000-000000");
const [amount, setAmount] = useState<String>("000,000");
const [accountNum, setAccountNum] = useState<String>("123456");
const [amount, setAmount] = useState<String>("520");
const accessToken = 1;



const sampleData = {
"items": [
Expand Down Expand Up @@ -58,12 +61,12 @@ const UserMainPage = () => {
"status": "Success"
}



const setHeaderTitle = useSetRecoilState(headerTitleState);
useEffect(() => {

setHeaderTitle(null);
});
}
);

const handleOnClickLinkBtn = useCallback(
(path: string) => {
Expand All @@ -90,7 +93,7 @@ const UserMainPage = () => {
{title}
</div>
<div className='account-num'>
{accountNum}
계좌번호 {accountNum}
</div>
<div className='main-amount'>
{amount}<span style={{color:"#F1AF23", paddingLeft:"5px"}}>TP</span>
Expand Down
6 changes: 3 additions & 3 deletions front-end/timepay-user/src/pages/Qna/QnaLogDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function QnaLogDetail() {
const [qnaDetail, setQnaDetail] = useState<QNADETAIL[]>([]);
const [openModal, setOpenModal] = useState(false);
const [comment, setComment] = useState("");
const userid = 1;
const userid = "1";
const accessToken = 1;

const handleModal = () => {
Expand Down Expand Up @@ -64,7 +64,7 @@ function QnaLogDetail() {
'Authorization':`Bearer ${accessToken}`
}
}).then(response => {
//console.log(response.data);
//console.log(typeof response.data[userid]);
setQnaDetail(response.data);
}).catch(function(error){
console.log(error)
Expand All @@ -85,7 +85,7 @@ function QnaLogDetail() {
<Card title={id} className="mainBox">
<Card>{content}</Card>
{qnaDetail.map((answer) => (
<Card title={<span style={answer.userId===id ? {color: 'orange'} : {color: 'red'}}>{answer.userId===id ? "byUSER" : "관리자"}</span>} extra={answer.commentDate} key={answer.commentid} className="detailBox">
<Card title={<span style={answer.userId===userid ? {color: 'orange'} : {color: 'red'}}>{answer.userId===userid ? "byUSER" : "관리자"}</span>} extra={answer.commentDate} key={answer.commentid} className="detailBox">
<p>{"content : " + answer.content}</p>

</Card>
Expand Down
8 changes: 8 additions & 0 deletions front-end/timepay-user/src/pages/Qna/qna_register.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

width:92%;

font-family: 'Lato';
font-style: normal;
font-weight : 600;

}

.inputContent{
Expand All @@ -14,6 +18,10 @@
margin:4%;
width:92%;
min-height:300px;

font-family: 'Lato';
font-style: normal;
font-weight : 600;
}

.registerButton {
Expand Down
3 changes: 2 additions & 1 deletion front-end/timepay-user/src/pages/Transfer/TransferAmount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ function TransferAmt() {
</div>

<div>
<input type="number" onChange={(e:React.ChangeEvent<HTMLInputElement>) => setAmount(+e.target.value)} placeholder="금액 입력" value={amount===0 ? "" : amount} className="inputBox"></input>
<input type="number" onChange={(e:React.ChangeEvent<HTMLInputElement>) => setAmount(+e.target.value)} placeholder="금액 입력"
style={amount===0 ? {color:"black"} : {color:"C7C7C7"}} value={amount===0 ? "" : amount} className="inputBox"></input>
<span className="fontTP">TP</span>

<div className="incButton">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/* font */
font-family: 'Lato';
font-style: normal;
font-weight: 400;
font-weight: 600;
font-size: 18px;
line-height: 100%;
text-align: center;
Expand Down
4 changes: 2 additions & 2 deletions front-end/timepay-user/src/utils/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export const PATH = {
SIGN_UP: '/signup',
PASSWORD: '/password',
MAIN: '/main',
UNREGIST: '/unregist',
PROFILE: '/profile',
UNREGISTAL: '/unregistal',
PROFILEEDIT: '/profile',
TRANSFER: '/transfer/account',
TRANSFERAMOUNT: '/transfer/amount',
TRANSFERPASSWORD: '/transfer/password',
Expand Down

0 comments on commit 3dde171

Please sign in to comment.