From 8cda40f414fe44dd0a3e9aa427e9213236325c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=82=E1=85=A9=E1=84=8C=E1=85=AE=E1=86=AB=E1=84=92?= =?UTF-8?q?=E1=85=A9?= Date: Tue, 11 Jun 2024 00:59:02 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20:=20=EC=9E=90=EC=9E=98=ED=95=9C=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EB=B0=8F=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(Form=20=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B1=B0=EB=9E=98=EC=9E=A5=EC=86=8C=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=AA=85,=20=EB=93=B1=EB=A1=9D=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EB=88=8C=EB=A0=80=EC=9D=84=20=EC=8B=9C=20=ED=8F=BC=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94,=20=EC=9E=85=EB=A0=A5=ED=8F=BC=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=8B=9C=20=ED=99=94=EB=A9=B4=ED=99=95=EB=8C=80=20?= =?UTF-8?q?=EB=B0=A9=EC=A7=80=20=EB=93=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 +- src/pages/Forms.js | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/public/index.html b/public/index.html index c657b96..1685ab7 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,7 @@ - + ({...prev,dealWay:"DELIVERY"})) + setBookInfo(prev=>({...prev,dealPlace:"",dealWay:"DELIVERY"})) } } const onChange_forms = (event) => { @@ -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(); @@ -189,7 +202,7 @@ function Forms(){