We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc90808 commit 30e59b1Copy full SHA for 30e59b1
1 file changed
components/site/contact-form.tsx
@@ -63,6 +63,18 @@ export function ContactForm() {
63
},
64
};
65
66
+ function resetForm() {
67
+ setProduct("");
68
+ setEmail("");
69
+ setEmailTouched(false);
70
+ setMessage("");
71
+ setAgree(false);
72
+ setHp("");
73
+ setErrors({});
74
+ setServerError(null);
75
+ setStatus("idle");
76
+ }
77
+
78
async function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
79
event.preventDefault();
80
setServerError(null);
@@ -127,6 +139,16 @@ export function ContactForm() {
127
139
<p className="mt-2 text-[var(--color-fg-muted)]">
128
140
확인 후 회신 드릴게요.
129
141
</p>
142
+ <div className="mt-6 flex justify-center">
143
+ <Button
144
+ type="button"
145
+ variant="secondary"
146
+ size="lg"
147
+ onClick={resetForm}
148
+ >
149
+ 새 문의 작성
150
+ </Button>
151
+ </div>
130
152
</div>
131
153
);
132
154
}
0 commit comments