diff --git a/src/components/extension-uninstall/Form.tsx b/src/components/extension-uninstall/Form.tsx index 9d18ca833..1942b7fb6 100644 --- a/src/components/extension-uninstall/Form.tsx +++ b/src/components/extension-uninstall/Form.tsx @@ -48,9 +48,14 @@ const StyledForm = styled.form` const Form = () => { const [state, setState] = useState<{ + name?: string + consent?: boolean + email?: string feedback: string otherFeedback?: string messageSent?: boolean + errorMessage?: string + }>({ feedback: '' }) @@ -78,9 +83,12 @@ const Form = () => { e.preventDefault() const email: Email = { - subject: 'Why did I uninstall the browser extension?', - feedback: state.feedback, - otherFeedback: state.otherFeedback + from: { + email: state.email, + name: state.name + }, + subject: 'Why did I uninstall the browser extension?' + ' (from ' + state.email + ')', + message: state.feedback + state.otherFeedback } fetch('/.netlify/functions/submit-form', { @@ -103,8 +111,20 @@ const Form = () => { onSubmit={handleSubmit} > { - !state.messageSent ? ( + state.messageSent ? ( +
+ Tick +

Thanks for your Feedback

+
+ ) : ( <> + +
+ +
+

Why did you uninstall the browser extension?

Check all that apply:

@@ -125,15 +145,53 @@ const Form = () => { Gitpod isn’t what I expected + + + + + + + +
+ + + +
+ + {state.errorMessage ?

{state.errorMessage}

: null} + - ) : ( -
- Tick -

Thanks for your Feedback

-
- ) + ) } )