Skip to content

Commit

Permalink
[Fix] : 자잘한 버그 및 오류 수정 (Form 페이지에서 거래장소 변수명, 등록하기 눌렀을 시 폼 초기화, 입력폼 클릭…
Browse files Browse the repository at this point in the history
… 시 화면확대 방지 등
  • Loading branch information
nohYoom08 committed Jun 10, 2024
1 parent c34b764 commit 8cda40f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
Expand Down
21 changes: 17 additions & 4 deletions src/pages/Forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Forms(){
price:'',
email:"",
dealWay:"DIRECT",
place:"",
dealPlace:"",
thumbnail:"",
state:"",
askFor:""
Expand Down Expand Up @@ -56,7 +56,7 @@ function Forms(){
}
else{
setTrade('DELIVERY');
setBookInfo(prev=>({...prev,dealWay:"DELIVERY"}))
setBookInfo(prev=>({...prev,dealPlace:"",dealWay:"DELIVERY"}))
}
}
const onChange_forms = (event) => {
Expand Down Expand Up @@ -109,8 +109,21 @@ function Forms(){
window.scrollTo(0,0);
const paths=window.location.pathname.split('/');
console.log(paths);
if(paths[paths.length-1]==='forms')
if(paths[paths.length-1]==='forms'){
setMode('a')
setBookInfo({
name:"",
author:"",
publisher:"",
price:'',
email:"",
dealWay:"DIRECT",
dealPlace:"",
thumbnail:"",
state:"",
askFor:""
})
}
else{
setMode('r');
fetchInfo();
Expand Down Expand Up @@ -189,7 +202,7 @@ function Forms(){
<input
disabled={trade==='DELIVERY'}
name='place'
value={bookInfo.place}
value={bookInfo.dealPlace}
onChange={onChange_forms}/>
</ShortInputBox>
</InputDiv>
Expand Down

0 comments on commit 8cda40f

Please sign in to comment.