Elffuss BraidHub

kikocis/continue public

a36aa2a5e5e6 路 1.7 KiBRawPermalink
1import { usePostHog } from "posthog-js/react";
2import { setDialogMessage } from "../../redux/slices/uiSlice";
3import { useAppDispatch } from "../../redux/hooks";
4
5export default function FeedbackDialog() {
6 const posthog = usePostHog();
7 const dispatch = useAppDispatch();
8
9 return (
10 <div className="p-4 text-center">
11 馃憢 Thanks for using Continue. We are always trying to improve and love
12 hearing from users. If you're interested in speaking, enter your name and
13 email. We won't use this information for anything other than reaching out.
14 <br />
15 <br />
16 <form
17 onSubmit={(e: any) => {
18 e.preventDefault();
19 posthog?.capture("user_interest_form", {
20 name: e.target.elements[0].value,
21 email: e.target.elements[1].value,
22 });
23 dispatch(
24 setDialogMessage(
25 <div className="p-4 text-center">
26 Thanks! We'll be in touch soon.
27 </div>,
28 ),
29 );
30 }}
31 style={{
32 display: "flex",
33 flexDirection: "column",
34 gap: "10px",
35 }}
36 >
37 <input
38 style={{ padding: "10px", borderRadius: "5px" }}
39 type="text"
40 name="name"
41 placeholder="Name"
42 required
43 />
44 <input
45 style={{ padding: "10px", borderRadius: "5px" }}
46 type="email"
47 name="email"
48 placeholder="Email"
49 required
50 />
51 <button
52 style={{
53 padding: "10px",
54 borderRadius: "5px",
55 cursor: "pointer",
56 }}
57 type="submit"
58 >
59 Submit
60 </button>
61 </form>
62 </div>
63 );
64}