aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-13 20:56:25 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-13 20:56:25 +0800
commit455f244ec582e220870f545eb9a34d58af72e356 (patch)
tree41cad02634472a3da04f3d27693d1d28ce45f0ba /packages/website/ts
parent6f7e27bd7fbb0e28acb245bec3b18cf944e24523 (diff)
downloaddexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.tar
dexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.tar.gz
dexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.tar.bz2
dexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.tar.lz
dexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.tar.xz
dexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.tar.zst
dexon-sol-tools-455f244ec582e220870f545eb9a34d58af72e356.zip
Hook up newsletter form to api
Diffstat (limited to 'packages/website/ts')
-rw-r--r--packages/website/ts/@next/components/newsletter_form.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/website/ts/@next/components/newsletter_form.tsx b/packages/website/ts/@next/components/newsletter_form.tsx
index 3277f7f2e..455e7b54c 100644
--- a/packages/website/ts/@next/components/newsletter_form.tsx
+++ b/packages/website/ts/@next/components/newsletter_form.tsx
@@ -58,16 +58,18 @@ export class NewsletterForm extends React.Component {
e.preventDefault();
const email = this.emailInput.current.value;
+ const referrer = "https://0xproject.com/";
this.setState({ isSubmitted: true });
try {
- const response = await fetch('/email', {
+ const response = await fetch('https://website-api.0xproject.com/newsletter_subscriber/substack', {
method: 'post',
+ mode: 'cors',
headers: {
'content-type': 'application/json; charset=utf-8',
},
- body: JSON.stringify({ email }),
+ body: JSON.stringify({ email, referrer }),
});
const json = await response.json();