Spaces:
Sleeping
Sleeping
Upload client/src/pages/Feedback.tsx with huggingface_hub
Browse files
client/src/pages/Feedback.tsx
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState } from 'react';
|
| 2 |
+
|
| 3 |
+
const Feedback: React.FC = () => {
|
| 4 |
+
const [subject, setSubject] = useState('Suggestion: ');
|
| 5 |
+
const [message, setMessage] = useState('');
|
| 6 |
+
|
| 7 |
+
const mailto = () => {
|
| 8 |
+
const to = 'your-email@example.com';
|
| 9 |
+
const body = encodeURIComponent(message);
|
| 10 |
+
const sub = encodeURIComponent(subject);
|
| 11 |
+
window.location.href = `mailto:${to}?subject=${sub}&body=${body}`;
|
| 12 |
+
};
|
| 13 |
+
|
| 14 |
+
return (
|
| 15 |
+
<div className="min-h-screen bg-gray-50 py-8">
|
| 16 |
+
<div className="max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
|
| 17 |
+
<h1 className="text-2xl font-semibold text-gray-900 mb-4">Feedback & Suggestions</h1>
|
| 18 |
+
<p className="text-sm text-gray-600 mb-4">Share feature requests or issues. This will open your email client and prefill the message.</p>
|
| 19 |
+
<div className="bg-white rounded-lg border border-gray-200 p-4 space-y-3">
|
| 20 |
+
<input
|
| 21 |
+
className="w-full border border-gray-300 rounded-md px-3 py-2"
|
| 22 |
+
placeholder="Subject"
|
| 23 |
+
value={subject}
|
| 24 |
+
onChange={(e) => setSubject(e.target.value)}
|
| 25 |
+
/>
|
| 26 |
+
<textarea
|
| 27 |
+
className="w-full border border-gray-300 rounded-md px-3 py-2 min-h-[160px]"
|
| 28 |
+
placeholder="Your message..."
|
| 29 |
+
value={message}
|
| 30 |
+
onChange={(e) => setMessage(e.target.value)}
|
| 31 |
+
/>
|
| 32 |
+
<div className="flex justify-end">
|
| 33 |
+
<button onClick={mailto} className="px-4 py-2 rounded-md bg-indigo-600 text-white hover:bg-indigo-700">Send via Email</button>
|
| 34 |
+
</div>
|
| 35 |
+
</div>
|
| 36 |
+
</div>
|
| 37 |
+
</div>
|
| 38 |
+
);
|
| 39 |
+
};
|
| 40 |
+
|
| 41 |
+
export default Feedback;
|
| 42 |
+
|
| 43 |
+
|