summary refs log tree commit diff
path: root/app/contact
diff options
context:
space:
mode:
Diffstat (limited to 'app/contact')
-rw-r--r--app/contact/page.tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/contact/page.tsx b/app/contact/page.tsx
index 1ed2eb8..e596fb7 100644
--- a/app/contact/page.tsx
+++ b/app/contact/page.tsx
@@ -10,18 +10,18 @@ export default function Contact() {
   const [submitting, setSubmitting] = useState(false)
   const [status, setStatus] = useState('')
 
-  const nameRef = useRef()
-  const emailRef = useRef()
-  const messageRef = useRef()
+  const nameRef = useRef<HTMLInputElement>()
+  const emailRef = useRef<HTMLInputElement>()
+  const messageRef = useRef<HTMLTextAreaElement>()
 
   const submit = async (ev: FormEvent<HTMLFormElement>) => {
     ev.preventDefault()
 
     setStatus('')
 
-    const name: string = nameRef.current?.value ?? ''
-    const email: string = emailRef.current?.value ?? ''
-    const message: string = messageRef.current?.value ?? ''
+    const name = nameRef.current.value
+    const email = emailRef.current.value
+    const message = messageRef.current.value
 
     if (!name) setStatus(s => s + ' Name required.')
     if (!email) setStatus(s => s + ' Email required.')