@codecademy/brand 3.32.0 → 3.33.0-alpha.8ba017088f.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { SubmitButton, useConnectedForm } from '@codecademy/gamut';
|
|
2
2
|
import React, { useState } from 'react';
|
|
3
|
+
import Cookies from 'universal-cookie';
|
|
3
4
|
import { ReferralFields } from './ReferralFields';
|
|
4
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
6
|
const createMember = (firstName, email) => {
|
|
7
|
+
const cookies = new Cookies();
|
|
6
8
|
return fetch(`${process.env.NEXT_PUBLIC_MONOLITH ?? ''}/referralrock/members`, {
|
|
7
9
|
method: 'POST',
|
|
8
10
|
credentials: 'include',
|
|
9
11
|
headers: {
|
|
10
12
|
'Content-Type': 'application/json',
|
|
11
13
|
'CF-Access-Client-Id': process.env.NEXT_PUBLIC_CF_ACCESS_CLIENT_ID ?? '',
|
|
12
|
-
'CF-Access-Client-Secret': process.env.NEXT_PUBLIC_CF_ACCESS_CLIENT_SECRET ?? ''
|
|
14
|
+
'CF-Access-Client-Secret': process.env.NEXT_PUBLIC_CF_ACCESS_CLIENT_SECRET ?? '',
|
|
15
|
+
'X-CSRF-Token': cookies.get('CSRF-TOKEN')
|
|
13
16
|
},
|
|
14
17
|
body: JSON.stringify({
|
|
15
18
|
firstName,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/brand",
|
|
3
3
|
"description": "Brand component library for Codecademy",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.33.0-alpha.8ba017088f.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "^1.2.1",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"pluralize": "^8.0.0",
|
|
20
20
|
"react-freezeframe": "^5.0.2",
|
|
21
21
|
"react-hook-form": "^7.21.2",
|
|
22
|
-
"react-use": "15.3.8"
|
|
22
|
+
"react-use": "15.3.8",
|
|
23
|
+
"universal-cookie": "^8.0.1"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
25
26
|
"dist/**"
|