diff --git a/cshare-app/src/pages/ContactPage.jsx b/cshare-app/src/pages/ContactPage.jsx new file mode 100644 index 0000000..f8ef128 --- /dev/null +++ b/cshare-app/src/pages/ContactPage.jsx @@ -0,0 +1,104 @@ +import { useState } from 'react'; +import { useToast } from '../components/ToastContext'; + +export default function ContactPage() { + const addToast = useToast(); + const [form, setForm] = useState({ name: '', email: '', subject: '', message: '' }); + const [sending, setSending] = useState(false); + + const set = (k) => (e) => setForm((f) => ({ ...f, [k]: e.target.value })); + + const submit = (e) => { + e.preventDefault(); + if (!form.name || !form.email || !form.message) { + addToast('Please fill in all required fields', 'error'); + return; + } + setSending(true); + setTimeout(() => { + setSending(false); + setForm({ name: '', email: '', subject: '', message: '' }); + addToast("Message sent — we'll get back to you within 48 hours", 'success'); + }, 1200); + }; + + return ( +
+ Questions, feedback, bugs, partnership ideas — we read everything and reply within 48 hours. +
+