diff --git a/teressa-copeland-homes/src/app/_components/ContactSection.tsx b/teressa-copeland-homes/src/app/_components/ContactSection.tsx new file mode 100644 index 0000000..2acc938 --- /dev/null +++ b/teressa-copeland-homes/src/app/_components/ContactSection.tsx @@ -0,0 +1,77 @@ +'use client' +import { useActionState } from 'react' +import { submitContact, type ContactState } from '@/lib/contact-action' + +const initialState: ContactState = { status: 'idle' } + +export function ContactSection() { + const [state, action, pending] = useActionState(submitContact, initialState) + + return ( +
+
+

Get in Touch

+

+ Ready to find your Utah home? Teressa is here to help. +

+ + {state.status === 'success' ? ( +
+

+ Thanks! Teressa will be in touch soon. +

+
+ ) : ( +
+ {/* Honeypot — hidden from humans, bots fill it in */} + + + + + +