Pin phone sheets to the visible viewport, and let people correct login and organizer errors.
This commit is contained in:
1 parent
27d74e510c
commit
39807ef452
17 files changed
+236
-16
No files matched your search
@@ -23,8 +23,10 @@ const AskOrganizerInquiryModalContainer = memo<AskOrganizerInquiryModalProps>(
|
||||
description: t("description"),
|
||||
emailLabel: t("emailLabel"),
|
||||
emailPlaceholder: t("emailPlaceholder"),
|
||||
emailInvalid: t("emailInvalid"),
|
||||
questionLabel: t("questionLabel"),
|
||||
questionPlaceholder: t("questionPlaceholder"),
|
||||
questionTooShort: t("questionTooShort"),
|
||||
submitButton: t("submitButton"),
|
||||
closeAfterSuccess: t("closeAfterSuccess"),
|
||||
successTitle: t("successTitle"),
|
||||
@@ -59,6 +61,16 @@ const AskOrganizerInquiryModalContainer = memo<AskOrganizerInquiryModalProps>(
|
||||
}
|
||||
}, [isOpen]);
|
||||
|
||||
const onEmailChange = useCallback((value: string) => {
|
||||
setEmail(value);
|
||||
setEmailError(false);
|
||||
}, []);
|
||||
|
||||
const onMessageChange = useCallback((value: string) => {
|
||||
setMessage(value);
|
||||
setQuestionError(false);
|
||||
}, []);
|
||||
|
||||
const onSubmit = useCallback(
|
||||
async (e: FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
@@ -149,8 +161,8 @@ const AskOrganizerInquiryModalContainer = memo<AskOrganizerInquiryModalProps>(
|
||||
sendFailed={sendFailed}
|
||||
emailError={emailError}
|
||||
questionError={questionError}
|
||||
onEmailChange={setEmail}
|
||||
onMessageChange={setMessage}
|
||||
onEmailChange={onEmailChange}
|
||||
onMessageChange={onMessageChange}
|
||||
onHoneypotChange={setHoneypot}
|
||||
onSubmit={onSubmit}
|
||||
onDismissFailed={() => setSendFailed(false)}
|
||||
|
||||
@@ -8,8 +8,10 @@ export interface AskOrganizerInquiryModalCopy {
|
||||
description: string;
|
||||
emailLabel: string;
|
||||
emailPlaceholder: string;
|
||||
emailInvalid: string;
|
||||
questionLabel: string;
|
||||
questionPlaceholder: string;
|
||||
questionTooShort: string;
|
||||
submitButton: string;
|
||||
closeAfterSuccess: string;
|
||||
successTitle: string;
|
||||
|
||||
@@ -125,6 +125,7 @@ export function AskOrganizerInquiryModalView({
|
||||
value={email}
|
||||
onChange={(e) => onEmailChange(e.target.value)}
|
||||
error={emailError}
|
||||
textHint={emailError ? copy.emailInvalid : false}
|
||||
inputSize="medium"
|
||||
showHelpIcon={false}
|
||||
/>
|
||||
@@ -136,6 +137,7 @@ export function AskOrganizerInquiryModalView({
|
||||
value={message}
|
||||
onChange={(e) => onMessageChange(e.target.value)}
|
||||
error={questionError}
|
||||
textHint={questionError ? copy.questionTooShort : false}
|
||||
size="medium"
|
||||
appearance="embedded"
|
||||
rows={4}
|
||||
|
||||
Reference in new issue
Block a user