11import { usePostHog } from "posthog-js/react" ;
2- import { setDialogMessage , setShowDialog } from "../../redux/slices/uiSlice" ;
2+ import { useState } from "react" ;
3+ import { Button , Input , SecondaryButton } from ".." ;
34import { useAppDispatch } from "../../redux/hooks" ;
5+ import { setDialogMessage , setShowDialog } from "../../redux/slices/uiSlice" ;
46
57export default function FeedbackDialog ( ) {
68 const posthog = usePostHog ( ) ;
79 const dispatch = useAppDispatch ( ) ;
10+ const [ submitted , setSubmitted ] = useState ( false ) ;
11+
12+ if ( submitted ) {
13+ }
814
915 return (
10- < div className = "mx-auto flex max-w-md flex-col gap-4 p-6" >
16+ < div className = "mx-auto flex max-w-md flex-col p-6 pt-8 " >
1117 < div className = "flex items-center gap-2 text-lg font-medium" >
1218 < span > 👋</ span >
1319 < span > Help us improve Continue</ span >
1420 </ div >
1521
16- < p className = "text-sm leading-relaxed text-gray-300 " >
22+ < p className = "text-foreground text- sm leading-relaxed" >
1723 We're always working to make Continue better and would love to hear from
1824 you. If you're interested in sharing your experience, please enter your
1925 details below.
@@ -30,51 +36,42 @@ export default function FeedbackDialog() {
3036 setDialogMessage (
3137 < div className = "p-6 text-center" >
3238 < div className = "mb-2 text-lg" > ✓ Thank you!</ div >
33- < p className = "text-sm text-gray-300" > We'll be in touch soon.</ p >
39+ < p className = "text-foreground text-sm" >
40+ We'll be in touch soon.
41+ </ p >
3442 </ div > ,
3543 ) ,
3644 ) ;
3745
3846 // Auto-close after 2 seconds
3947 setTimeout ( ( ) => {
4048 dispatch ( setShowDialog ( false ) ) ;
49+ dispatch ( setDialogMessage ( undefined ) ) ;
4150 } , 2000 ) ;
4251 } }
4352 className = "flex flex-col gap-3"
4453 >
45- < input
46- className = "rounded-md border border-gray-600 bg-gray-800 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500"
47- type = "text"
48- name = "name"
49- placeholder = "Name"
50- required
51- />
52- < input
53- className = "rounded-md border border-gray-600 bg-gray-800 px-3 py-2 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-blue-500"
54- type = "email"
55- name = "email"
56- placeholder = "Email"
57- required
58- />
59- < div className = "mt-2 flex gap-2" >
60- < button
61- type = "submit"
62- className = "flex-1 rounded-md bg-blue-600 px-4 py-2 font-medium transition-colors hover:bg-blue-700"
63- >
64- Submit
65- </ button >
66- < button
54+ < Input type = "text" name = "name" placeholder = "Name" required />
55+ < Input type = "email" name = "email" placeholder = "Email" required />
56+ < div className = "mt-2 flex justify-between gap-2" >
57+ < SecondaryButton
58+ className = "flex-1"
6759 type = "button"
68- onClick = { ( ) => dispatch ( setShowDialog ( false ) ) }
69- className = "rounded-md bg-gray-700 px-4 py-2 font-medium transition-colors hover:bg-gray-600"
60+ onClick = { ( ) => {
61+ dispatch ( setShowDialog ( false ) ) ;
62+ dispatch ( setDialogMessage ( undefined ) ) ;
63+ } }
7064 >
7165 Not now
72- </ button >
66+ </ SecondaryButton >
67+ < Button className = "flex-1" type = "submit" >
68+ Submit
69+ </ Button >
7370 </ div >
7471 </ form >
7572
76- < p className = "text-center text-xs text-gray-400 " >
77- We won't use this information for anything other than reaching out .
73+ < p className = "text-description-muted text-xs " >
74+ We'll only use this information to reach out for feedback .
7875 </ p >
7976 </ div >
8077 ) ;
0 commit comments