diff options
author | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 20:56:25 +0800 |
---|---|---|
committer | Fred Carlsen <fred@sjelfull.no> | 2018-12-13 20:56:25 +0800 |
commit | 455f244ec582e220870f545eb9a34d58af72e356 (patch) | |
tree | 41cad02634472a3da04f3d27693d1d28ce45f0ba /packages/website | |
parent | 6f7e27bd7fbb0e28acb245bec3b18cf944e24523 (diff) | |
download | dexon-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')
-rw-r--r-- | packages/website/ts/@next/components/newsletter_form.tsx | 6 |
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(); |