Skip to content

Commit

Permalink
redirect to sg alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicarrojado committed Oct 23, 2023
1 parent 4467b81 commit 1b2c6aa
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions components/subscribeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,37 @@ export default function SubscribeForm() {
const formOnSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();

const formEl = e.target as HTMLFormElement;
const email = formEl.email.value;
// const formEl = e.target as HTMLFormElement;
// const email = formEl.email.value;

submitSubscriptionRequest(email);
setSubmittedEmail(email);
// submitSubscriptionRequest(email);
// setSubmittedEmail(email);

trackEvent({
event: GoogleAnalyticsEvent.SUBSCRIBE_FORM_SUBMIT,
buttonText: submitText,
});
// trackEvent({
// event: GoogleAnalyticsEvent.SUBSCRIBE_FORM_SUBMIT,
// buttonText: submitText,
// });
};

return (
<Form
className={cn(
'sticky transition-all duration-500 delay-700',
isCookieBannerClosed ? 'bottom-6' : 'bottom-32 xl:bottom-6'
)}
className={cn('sticky transition-all duration-500 delay-700 bottom-6')}
onSubmit={formOnSubmit}
>
<FormBody>
{fetchState !== FetchState.SUCCESS ? (
<>
<Input
<p>
<b className="font-medium">
Japan Visa Appointment Notification Service
</b>{' '}
has now been migrated to <b className="font-medium">SG Alerts</b>.
To sign up for notifications, please visit the new website.
</p>
<a href="https://dominicarrojado.com/sg-alerts/">
<Button>Go to SG Alerts</Button>
</a>
{/* <Input
label="Email Address"
type="email"
name="email"
Expand Down Expand Up @@ -74,7 +81,7 @@ export default function SubscribeForm() {
{isLoading && <ButtonLoader />}
{submitText}
</Button>
</div>
</div> */}
</>
) : (
<p>
Expand Down

0 comments on commit 1b2c6aa

Please sign in to comment.