Commit eeb2fff2 authored by CHAERIN KIM's avatar CHAERIN KIM
Browse files

시간중복방지

parent 30c95dda
...@@ -22,7 +22,6 @@ function Apply(props) { ...@@ -22,7 +22,6 @@ function Apply(props) {
} }
function time(starttime) { function time(starttime) {
console.log(starttime)
if (starttime == 21) { if (starttime == 21) {
return (<Field as="select" name="usetime"> return (<Field as="select" name="usetime">
<option value="">이용시간을 선택하세요</option> <option value="">이용시간을 선택하세요</option>
...@@ -93,17 +92,21 @@ function Apply(props) { ...@@ -93,17 +92,21 @@ function Apply(props) {
url: '/reserves', url: '/reserves',
data: values data: values
}).then(res => { }).then(res => {
if (res.status === 404) return alert(res.data.error) if (res.status === 404) {
alert(res.data.error)
return window.location.reload();
}
alert("신청이 완료되었습니다!"); alert("신청이 완료되었습니다!");
setState(true); setState(true);
console.log("res.data", res.data)
}) })
.catch(err => { .catch(err => {
alert(err.error) alert(err.error)
}); });
// setTimeout(() => { setTimeout(() => {
// setSubmitting(false); setSubmitting(false);
// }, 400); // finish the cycle in handler }, 400); // finish the cycle in handler
}} }}
> >
{({ {({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment