Skip to content

Commit 042a8d5

Browse files
authored
feat: add Mailchimp archive link to subscription success message (#258)
1 parent dff5e89 commit 042a8d5

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/components/atomic/MailchimpSubscribeForm.js

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,31 @@ const MAILCHIMP_URL =
77

88
/**
99
* @author
10-
* @function MailchimpSubscribe
10+
* @function MailchimpSubscribeForm
1111
**/
1212

1313
const SimpleForm = () => <MailchimpSubscribe url={MAILCHIMP_URL} />
1414

1515
const MailchimpSubscribeForm = () => {
16-
const [email, setEmail] = React.useState("")
16+
const [email, setEmail] = useState("")
1717
const [fetching, setFetching] = useState(false)
1818

1919
useEffect(() => {
2020
setFetching(true)
21-
},[])
21+
}, [])
2222

2323
return (
2424
<Box direction={"column"}>
2525
<MailchimpSubscribe
2626
url={MAILCHIMP_URL}
2727
render={({ subscribe, status, message }) => {
28-
// status = "success"
2928
return (
3029
<Box direction={"column"}>
3130
{status !== "success" && (
3231
<>
3332
<Text size={"medium"} weight={600}>
34-
{" "}
3533
Join an engaged community working on civic tech approaches
36-
to tackling online harms on our mailing list{" "}
34+
to tackling online harms on our mailing list
3735
</Text>
3836
<Box height={"xxsmall"} />
3937
<Box
@@ -48,12 +46,9 @@ const MailchimpSubscribeForm = () => {
4846
onChange={event => setEmail(event.target.value)}
4947
background={"#FFFFFF"}
5048
/>
51-
5249
<Button
5350
primary
54-
label={
55-
status === "sending" ? "Submitting..." : "Subscribe"
56-
}
51+
label={status === "sending" ? "Submitting..." : "Subscribe"}
5752
onClick={() => {
5853
subscribe({ EMAIL: email })
5954
}}
@@ -65,13 +60,22 @@ const MailchimpSubscribeForm = () => {
6560
{status === "success" && (
6661
<Box
6762
margin={{ top: "small" }}
68-
animation={{ type: "fadeOut", duration: 3000 }}
63+
animation={{ type: "fadeIn", duration: 1000 }}
6964
>
7065
<Text size={"medium"}>
71-
Thank you. We look forward to sharing our progress with you
66+
Thank you! We look forward to sharing our progress with you. You can view our past newsletters&nbsp;
67+
<a
68+
href="https://us19.campaign-archive.com/home/?u=a9af83af1f247ecc04f50ad46&id=4afc4a2c79"
69+
target="_blank"
70+
rel="noopener noreferrer"
71+
style={{ color: "#0070f3", textDecoration: "underline" }}
72+
>
73+
here
74+
</a>.
7275
</Text>
7376
</Box>
7477
)}
78+
7579
{status === "error" && (
7680
<Text size={"medium"} color={"status-error"}>
7781
There was an error saving your email. Please try again later.

0 commit comments

Comments
 (0)