@comicrelief/component-library 7.1.1 → 7.3.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.
- package/cypress/integration/components/Atoms/SocialIcons.spec.js +176 -176
- package/dist/components/Atoms/SocialIcons/Utils/Icons.js +2 -2
- package/dist/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +27 -27
- package/dist/components/Atoms/SocialIcons/assets/instagram.svg +3 -1
- package/dist/components/Organisms/Donate/Form/Form.js +20 -9
- package/dist/components/Organisms/Donate/Form/PopUpComponent.js +15 -5
- package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.js +11 -4
- package/dist/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +9 -9
- package/dist/utils/Membership.js +2 -1
- package/package.json +1 -1
- package/src/components/Atoms/SocialIcons/Utils/Icons.js +2 -2
- package/src/components/Atoms/SocialIcons/__snapshots__/SocialIcons.test.js.snap +27 -27
- package/src/components/Atoms/SocialIcons/assets/instagram.svg +3 -1
- package/src/components/Organisms/Donate/Form/Form.js +12 -4
- package/src/components/Organisms/Donate/Form/PopUpComponent.js +19 -8
- package/src/components/Organisms/Donate/GivingSelector/GivingSelector.js +45 -41
- package/src/components/Organisms/Footer/__snapshots__/Footer.test.js.snap +9 -9
- package/src/utils/Membership.js +3 -2
|
@@ -1,179 +1,179 @@
|
|
|
1
1
|
describe('SocialIcons component', () => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('is present', () => {
|
|
19
|
-
cy.get('@propsBtn').should('exist');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('does not show table initially', () => {
|
|
23
|
-
cy.get('@container')
|
|
24
|
-
.find('table')
|
|
25
|
-
.should('not.exist');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('shows the table on button click', () => {
|
|
29
|
-
cy.get('@propsBtn').click();
|
|
30
|
-
cy.get('@container')
|
|
31
|
-
.find('table')
|
|
32
|
-
.should('contain', 'Prop name');
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
describe('Comic Relief social icons section', () => {
|
|
37
|
-
beforeEach(() => {
|
|
38
|
-
cy.get('[data-testid="SocialIcons-example-1"]')
|
|
39
|
-
.as('container')
|
|
40
|
-
.find('[data-preview="SocialIcons"]')
|
|
41
|
-
.as('preview');
|
|
42
|
-
|
|
43
|
-
cy.get('@container')
|
|
44
|
-
.find('button')
|
|
45
|
-
.contains('View Code')
|
|
46
|
-
.as('viewCodeBtn');
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('checks comic relief social icons', () => {
|
|
50
|
-
cy.get('@container')
|
|
51
|
-
.find('a')
|
|
52
|
-
.first()
|
|
53
|
-
.should('have.attr', 'href', 'https://www.facebook.com/comicrelief');
|
|
54
|
-
cy.get('@container')
|
|
55
|
-
.find('li:nth-child(2) > a')
|
|
56
|
-
.should('have.attr', 'href', 'https://twitter.com/comicrelief');
|
|
57
|
-
cy.get('@container')
|
|
58
|
-
.find('li:nth-child(3) > a')
|
|
59
|
-
.should('have.attr', 'href', 'https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw');
|
|
60
|
-
cy.get('@container')
|
|
61
|
-
.find('li:nth-child(4) > a')
|
|
62
|
-
.should('have.attr', 'href', 'https://www.instagram.com/comicrelief');
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
it('has view code button', () => {
|
|
66
|
-
cy.get('@viewCodeBtn').should('exist');
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('shows code on click', () => {
|
|
70
|
-
cy.get('@viewCodeBtn').click();
|
|
71
|
-
cy.get('@container')
|
|
72
|
-
.find('textarea')
|
|
73
|
-
.should('exist');
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('closes code on click', () => {
|
|
77
|
-
cy.get('@viewCodeBtn').click();
|
|
78
|
-
cy.get('@container')
|
|
79
|
-
.find('textarea')
|
|
80
|
-
.should('not.exist');
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
describe('Red Nose Day social icons section', () => {
|
|
85
|
-
beforeEach(() => {
|
|
86
|
-
cy.get('[data-testid="SocialIcons-example-3"]')
|
|
87
|
-
.as('container')
|
|
88
|
-
.find('[data-preview="SocialIcons"]')
|
|
89
|
-
.as('preview');
|
|
90
|
-
|
|
91
|
-
cy.get('@container')
|
|
92
|
-
.find('button')
|
|
93
|
-
.contains('View Code')
|
|
94
|
-
.as('viewCodeBtn');
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('checks Red Nose Day social icons', () => {
|
|
98
|
-
cy.get('@container')
|
|
99
|
-
.find('a')
|
|
100
|
-
.first()
|
|
101
|
-
.should('have.attr', 'href', 'https://www.facebook.com/rednoseday');
|
|
102
|
-
cy.get('@container')
|
|
103
|
-
.find('li:nth-child(2) > a')
|
|
104
|
-
.should('have.attr', 'href', 'https://twitter.com/rednoseday');
|
|
105
|
-
cy.get('@container')
|
|
106
|
-
.find('li:nth-child(3) > a')
|
|
107
|
-
.should('have.attr', 'href', 'https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw');
|
|
108
|
-
cy.get('@container')
|
|
109
|
-
.find('li:nth-child(4) > a')
|
|
110
|
-
.should('have.attr', 'href', 'https://www.instagram.com/rednoseday');
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('has view code button', () => {
|
|
114
|
-
cy.get('@viewCodeBtn').should('exist');
|
|
115
|
-
});
|
|
116
|
-
|
|
117
|
-
it('shows code on click', () => {
|
|
118
|
-
cy.get('@viewCodeBtn').click();
|
|
119
|
-
cy.get('@container')
|
|
120
|
-
.find('textarea')
|
|
121
|
-
.should('exist');
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it('closes code on click', () => {
|
|
125
|
-
cy.get('@viewCodeBtn').click();
|
|
126
|
-
cy.get('@container')
|
|
127
|
-
.find('textarea')
|
|
128
|
-
.should('not.exist');
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
describe('Sport Relief social icons section', () => {
|
|
133
|
-
beforeEach(() => {
|
|
134
|
-
cy.get('[data-testid="SocialIcons-example-5"]')
|
|
135
|
-
.as('container')
|
|
136
|
-
.find('[data-preview="SocialIcons"]')
|
|
137
|
-
.as('preview');
|
|
138
|
-
|
|
139
|
-
cy.get('@container')
|
|
140
|
-
.find('button')
|
|
141
|
-
.contains('View Code')
|
|
142
|
-
.as('viewCodeBtn');
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it('checks Sport Relief social icons', () => {
|
|
146
|
-
cy.get('@container')
|
|
147
|
-
.find('a')
|
|
148
|
-
.first()
|
|
149
|
-
.should('have.attr', 'href', 'https://www.facebook.com/sportrelief');
|
|
150
|
-
cy.get('@container')
|
|
151
|
-
.find('li:nth-child(2) > a')
|
|
152
|
-
.should('have.attr', 'href', 'https://twitter.com/sportrelief');
|
|
153
|
-
cy.get('@container')
|
|
154
|
-
.find('li:nth-child(3) > a')
|
|
155
|
-
.should('have.attr', 'href', 'https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw');
|
|
156
|
-
cy.get('@container')
|
|
157
|
-
.find('li:nth-child(4) > a')
|
|
158
|
-
.should('have.attr', 'href', 'https://www.instagram.com/sportrelief');
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
it('has view code button', () => {
|
|
162
|
-
cy.get('@viewCodeBtn').should('exist');
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
it('shows code on click', () => {
|
|
166
|
-
cy.get('@viewCodeBtn').click();
|
|
167
|
-
cy.get('@container')
|
|
168
|
-
.find('textarea')
|
|
169
|
-
.should('exist');
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
it('closes code on click', () => {
|
|
173
|
-
cy.get('@viewCodeBtn').click();
|
|
174
|
-
cy.get('@container')
|
|
175
|
-
.find('textarea')
|
|
176
|
-
.should('not.exist');
|
|
177
|
-
});
|
|
2
|
+
before(() => {
|
|
3
|
+
// go to social icons component
|
|
4
|
+
cy.visit('/#socialicons');
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
describe('props and methods section', () => {
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
cy.get('[data-testid="SocialIcons-container"] button[name="rsg-usage"]')
|
|
10
|
+
.contains('Props & methods')
|
|
11
|
+
.as('propsBtn');
|
|
12
|
+
|
|
13
|
+
cy.get('@propsBtn')
|
|
14
|
+
.closest('[class^=rsg--tabs]')
|
|
15
|
+
.as('container');
|
|
178
16
|
});
|
|
17
|
+
|
|
18
|
+
it('is present', () => {
|
|
19
|
+
cy.get('@propsBtn').should('exist');
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('does not show table initially', () => {
|
|
23
|
+
cy.get('@container')
|
|
24
|
+
.find('table')
|
|
25
|
+
.should('not.exist');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('shows the table on button click', () => {
|
|
29
|
+
cy.get('@propsBtn').click();
|
|
30
|
+
cy.get('@container')
|
|
31
|
+
.find('table')
|
|
32
|
+
.should('contain', 'Prop name');
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
describe('Comic Relief social icons section', () => {
|
|
37
|
+
beforeEach(() => {
|
|
38
|
+
cy.get('[data-testid="SocialIcons-example-1"]')
|
|
39
|
+
.as('container')
|
|
40
|
+
.find('[data-preview="SocialIcons"]')
|
|
41
|
+
.as('preview');
|
|
42
|
+
|
|
43
|
+
cy.get('@container')
|
|
44
|
+
.find('button')
|
|
45
|
+
.contains('View Code')
|
|
46
|
+
.as('viewCodeBtn');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('checks comic relief social icons', () => {
|
|
50
|
+
cy.get('@container')
|
|
51
|
+
.find('a')
|
|
52
|
+
.first()
|
|
53
|
+
.should('have.attr', 'href', 'https://www.facebook.com/comicrelief');
|
|
54
|
+
cy.get('@container')
|
|
55
|
+
.find('li:nth-child(2) > a')
|
|
56
|
+
.should('have.attr', 'href', 'https://www.instagram.com/comicrelief');
|
|
57
|
+
cy.get('@container')
|
|
58
|
+
.find('li:nth-child(3) > a')
|
|
59
|
+
.should('have.attr', 'href', 'https://twitter.com/comicrelief');
|
|
60
|
+
cy.get('@container')
|
|
61
|
+
.find('li:nth-child(4) > a')
|
|
62
|
+
.should('have.attr', 'href', 'https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw');
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('has view code button', () => {
|
|
66
|
+
cy.get('@viewCodeBtn').should('exist');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('shows code on click', () => {
|
|
70
|
+
cy.get('@viewCodeBtn').click();
|
|
71
|
+
cy.get('@container')
|
|
72
|
+
.find('textarea')
|
|
73
|
+
.should('exist');
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
it('closes code on click', () => {
|
|
77
|
+
cy.get('@viewCodeBtn').click();
|
|
78
|
+
cy.get('@container')
|
|
79
|
+
.find('textarea')
|
|
80
|
+
.should('not.exist');
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
describe('Red Nose Day social icons section', () => {
|
|
85
|
+
beforeEach(() => {
|
|
86
|
+
cy.get('[data-testid="SocialIcons-example-3"]')
|
|
87
|
+
.as('container')
|
|
88
|
+
.find('[data-preview="SocialIcons"]')
|
|
89
|
+
.as('preview');
|
|
90
|
+
|
|
91
|
+
cy.get('@container')
|
|
92
|
+
.find('button')
|
|
93
|
+
.contains('View Code')
|
|
94
|
+
.as('viewCodeBtn');
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
it('checks Red Nose Day social icons', () => {
|
|
98
|
+
cy.get('@container')
|
|
99
|
+
.find('a')
|
|
100
|
+
.first()
|
|
101
|
+
.should('have.attr', 'href', 'https://www.facebook.com/rednoseday');
|
|
102
|
+
cy.get('@container')
|
|
103
|
+
.find('li:nth-child(2) > a')
|
|
104
|
+
.should('have.attr', 'href', 'https://www.instagram.com/rednoseday');
|
|
105
|
+
cy.get('@container')
|
|
106
|
+
.find('li:nth-child(3) > a')
|
|
107
|
+
.should('have.attr', 'href', 'https://twitter.com/rednoseday');
|
|
108
|
+
cy.get('@container')
|
|
109
|
+
.find('li:nth-child(4) > a')
|
|
110
|
+
.should('have.attr', 'href', 'https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw');
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('has view code button', () => {
|
|
114
|
+
cy.get('@viewCodeBtn').should('exist');
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
it('shows code on click', () => {
|
|
118
|
+
cy.get('@viewCodeBtn').click();
|
|
119
|
+
cy.get('@container')
|
|
120
|
+
.find('textarea')
|
|
121
|
+
.should('exist');
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
it('closes code on click', () => {
|
|
125
|
+
cy.get('@viewCodeBtn').click();
|
|
126
|
+
cy.get('@container')
|
|
127
|
+
.find('textarea')
|
|
128
|
+
.should('not.exist');
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
describe('Sport Relief social icons section', () => {
|
|
133
|
+
beforeEach(() => {
|
|
134
|
+
cy.get('[data-testid="SocialIcons-example-5"]')
|
|
135
|
+
.as('container')
|
|
136
|
+
.find('[data-preview="SocialIcons"]')
|
|
137
|
+
.as('preview');
|
|
138
|
+
|
|
139
|
+
cy.get('@container')
|
|
140
|
+
.find('button')
|
|
141
|
+
.contains('View Code')
|
|
142
|
+
.as('viewCodeBtn');
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
it('checks Sport Relief social icons', () => {
|
|
146
|
+
cy.get('@container')
|
|
147
|
+
.find('a')
|
|
148
|
+
.first()
|
|
149
|
+
.should('have.attr', 'href', 'https://www.facebook.com/sportrelief');
|
|
150
|
+
cy.get('@container')
|
|
151
|
+
.find('li:nth-child(2) > a')
|
|
152
|
+
.should('have.attr', 'href', 'https://www.instagram.com/sportrelief');
|
|
153
|
+
cy.get('@container')
|
|
154
|
+
.find('li:nth-child(3) > a')
|
|
155
|
+
.should('have.attr', 'href', 'https://twitter.com/sportrelief');
|
|
156
|
+
cy.get('@container')
|
|
157
|
+
.find('li:nth-child(4) > a')
|
|
158
|
+
.should('have.attr', 'href', 'https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw');
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('has view code button', () => {
|
|
162
|
+
cy.get('@viewCodeBtn').should('exist');
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
it('shows code on click', () => {
|
|
166
|
+
cy.get('@viewCodeBtn').click();
|
|
167
|
+
cy.get('@container')
|
|
168
|
+
.find('textarea')
|
|
169
|
+
.should('exist');
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
it('closes code on click', () => {
|
|
173
|
+
cy.get('@viewCodeBtn').click();
|
|
174
|
+
cy.get('@container')
|
|
175
|
+
.find('textarea')
|
|
176
|
+
.should('not.exist');
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
179
|
});
|
|
@@ -17,8 +17,8 @@ var _instagram = _interopRequireDefault(require("../assets/instagram.svg"));
|
|
|
17
17
|
|
|
18
18
|
var _default = {
|
|
19
19
|
facebook: _facebook.default,
|
|
20
|
+
instagram: _instagram.default,
|
|
20
21
|
twitter: _twitter.default,
|
|
21
|
-
youtube: _youtube.default
|
|
22
|
-
instagram: _instagram.default
|
|
22
|
+
youtube: _youtube.default
|
|
23
23
|
};
|
|
24
24
|
exports.default = _default;
|
|
@@ -104,13 +104,13 @@ exports[`renders correctly with Comic Relief links 1`] = `
|
|
|
104
104
|
<a
|
|
105
105
|
className="c2"
|
|
106
106
|
data-test="header-esu-icon"
|
|
107
|
-
href="https://
|
|
107
|
+
href="https://www.instagram.com/comicrelief"
|
|
108
108
|
rel="noopener noreferrer"
|
|
109
109
|
target="_blank"
|
|
110
|
-
title="Check out our
|
|
110
|
+
title="Check out our Instagram account"
|
|
111
111
|
>
|
|
112
112
|
<img
|
|
113
|
-
alt="
|
|
113
|
+
alt="instagram"
|
|
114
114
|
className="c3"
|
|
115
115
|
src="mock.asset"
|
|
116
116
|
/>
|
|
@@ -127,13 +127,13 @@ exports[`renders correctly with Comic Relief links 1`] = `
|
|
|
127
127
|
<a
|
|
128
128
|
className="c2"
|
|
129
129
|
data-test="header-esu-icon"
|
|
130
|
-
href="https://
|
|
130
|
+
href="https://twitter.com/comicrelief"
|
|
131
131
|
rel="noopener noreferrer"
|
|
132
132
|
target="_blank"
|
|
133
|
-
title="Check out our
|
|
133
|
+
title="Check out our Twitter account"
|
|
134
134
|
>
|
|
135
135
|
<img
|
|
136
|
-
alt="
|
|
136
|
+
alt="twitter"
|
|
137
137
|
className="c3"
|
|
138
138
|
src="mock.asset"
|
|
139
139
|
/>
|
|
@@ -150,13 +150,13 @@ exports[`renders correctly with Comic Relief links 1`] = `
|
|
|
150
150
|
<a
|
|
151
151
|
className="c2"
|
|
152
152
|
data-test="header-esu-icon"
|
|
153
|
-
href="https://www.
|
|
153
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
154
154
|
rel="noopener noreferrer"
|
|
155
155
|
target="_blank"
|
|
156
|
-
title="Check out our
|
|
156
|
+
title="Check out our YouTube channel"
|
|
157
157
|
>
|
|
158
158
|
<img
|
|
159
|
-
alt="
|
|
159
|
+
alt="youtube"
|
|
160
160
|
className="c3"
|
|
161
161
|
src="mock.asset"
|
|
162
162
|
/>
|
|
@@ -274,13 +274,13 @@ exports[`renders correctly with Red Nose Day links and self target 1`] = `
|
|
|
274
274
|
<a
|
|
275
275
|
className="c2"
|
|
276
276
|
data-test="header-esu-icon"
|
|
277
|
-
href="https://
|
|
277
|
+
href="https://www.instagram.com/rednoseday"
|
|
278
278
|
rel="noopener noreferrer"
|
|
279
279
|
target="_self"
|
|
280
|
-
title="Check out our
|
|
280
|
+
title="Check out our Instagram account"
|
|
281
281
|
>
|
|
282
282
|
<img
|
|
283
|
-
alt="
|
|
283
|
+
alt="instagram"
|
|
284
284
|
className="c3"
|
|
285
285
|
src="mock.asset"
|
|
286
286
|
/>
|
|
@@ -297,13 +297,13 @@ exports[`renders correctly with Red Nose Day links and self target 1`] = `
|
|
|
297
297
|
<a
|
|
298
298
|
className="c2"
|
|
299
299
|
data-test="header-esu-icon"
|
|
300
|
-
href="https://
|
|
300
|
+
href="https://twitter.com/rednoseday"
|
|
301
301
|
rel="noopener noreferrer"
|
|
302
302
|
target="_self"
|
|
303
|
-
title="Check out our
|
|
303
|
+
title="Check out our Twitter account"
|
|
304
304
|
>
|
|
305
305
|
<img
|
|
306
|
-
alt="
|
|
306
|
+
alt="twitter"
|
|
307
307
|
className="c3"
|
|
308
308
|
src="mock.asset"
|
|
309
309
|
/>
|
|
@@ -320,13 +320,13 @@ exports[`renders correctly with Red Nose Day links and self target 1`] = `
|
|
|
320
320
|
<a
|
|
321
321
|
className="c2"
|
|
322
322
|
data-test="header-esu-icon"
|
|
323
|
-
href="https://www.
|
|
323
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
324
324
|
rel="noopener noreferrer"
|
|
325
325
|
target="_self"
|
|
326
|
-
title="Check out our
|
|
326
|
+
title="Check out our YouTube channel"
|
|
327
327
|
>
|
|
328
328
|
<img
|
|
329
|
-
alt="
|
|
329
|
+
alt="youtube"
|
|
330
330
|
className="c3"
|
|
331
331
|
src="mock.asset"
|
|
332
332
|
/>
|
|
@@ -444,13 +444,13 @@ exports[`renders correctly with Sport Relief links 1`] = `
|
|
|
444
444
|
<a
|
|
445
445
|
className="c2"
|
|
446
446
|
data-test="header-esu-icon"
|
|
447
|
-
href="https://
|
|
447
|
+
href="https://www.instagram.com/sportrelief"
|
|
448
448
|
rel="noopener noreferrer"
|
|
449
449
|
target="_blank"
|
|
450
|
-
title="Check out our
|
|
450
|
+
title="Check out our Instagram account"
|
|
451
451
|
>
|
|
452
452
|
<img
|
|
453
|
-
alt="
|
|
453
|
+
alt="instagram"
|
|
454
454
|
className="c3"
|
|
455
455
|
src="mock.asset"
|
|
456
456
|
/>
|
|
@@ -467,13 +467,13 @@ exports[`renders correctly with Sport Relief links 1`] = `
|
|
|
467
467
|
<a
|
|
468
468
|
className="c2"
|
|
469
469
|
data-test="header-esu-icon"
|
|
470
|
-
href="https://
|
|
470
|
+
href="https://twitter.com/sportrelief"
|
|
471
471
|
rel="noopener noreferrer"
|
|
472
472
|
target="_blank"
|
|
473
|
-
title="Check out our
|
|
473
|
+
title="Check out our Twitter account"
|
|
474
474
|
>
|
|
475
475
|
<img
|
|
476
|
-
alt="
|
|
476
|
+
alt="twitter"
|
|
477
477
|
className="c3"
|
|
478
478
|
src="mock.asset"
|
|
479
479
|
/>
|
|
@@ -490,13 +490,13 @@ exports[`renders correctly with Sport Relief links 1`] = `
|
|
|
490
490
|
<a
|
|
491
491
|
className="c2"
|
|
492
492
|
data-test="header-esu-icon"
|
|
493
|
-
href="https://www.
|
|
493
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
494
494
|
rel="noopener noreferrer"
|
|
495
495
|
target="_blank"
|
|
496
|
-
title="Check out our
|
|
496
|
+
title="Check out our YouTube channel"
|
|
497
497
|
>
|
|
498
498
|
<img
|
|
499
|
-
alt="
|
|
499
|
+
alt="youtube"
|
|
500
500
|
className="c3"
|
|
501
501
|
src="mock.asset"
|
|
502
502
|
/>
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 48C37.2548 48 48 37.2549 48 24C48 10.7451 37.2548 0 24 0C10.7452 0 0 10.7451 0 24C0 37.2549 10.7452 48 24 48ZM12.8354 7.91736C13.9153 7.49304 15.1505 7.20435 16.9593 7.11902C18.7725 7.03064 19.3505 7.01086 23.9673 7.00208C28.5842 6.99329 29.1666 7.01331 30.9761 7.09155C32.7856 7.16968 34.0215 7.45496 35.1034 7.87354C36.223 8.30457 37.1723 8.88428 38.1182 9.82788C39.064 10.7714 39.6472 11.7175 40.084 12.8351C40.5081 13.916 40.796 15.1471 40.882 16.96C40.9681 18.7728 40.9888 19.3516 40.9976 23.9674C41.0065 28.5833 40.9878 29.1626 40.9086 30.9772C40.83 32.7853 40.5454 34.0219 40.1265 35.103C39.6944 36.223 39.1144 37.1716 38.1722 38.1182C37.2301 39.0648 36.2825 39.6476 35.1649 40.0847C34.0844 40.5071 32.856 40.7968 31.0428 40.8827C29.2296 40.9688 28.6485 40.9891 24.0333 40.998C19.4182 41.0068 18.8358 40.9885 17.0262 40.9093C15.2168 40.8301 13.9802 40.5452 12.899 40.1273C11.777 39.6941 10.8298 39.1151 9.88354 38.1722C8.93732 37.2295 8.35352 36.2826 7.9173 35.1649C7.49298 34.0848 7.20532 32.8499 7.11902 31.0415C7.03125 29.2279 7.01086 28.6492 7.00201 24.0327C6.99316 19.4161 7.01086 18.8345 7.09076 17.0247C7.17065 15.2148 7.45422 13.9785 7.87274 12.8964C8.30524 11.7771 8.88562 10.8291 9.82812 9.8833C10.7706 8.93738 11.7178 8.35291 12.8354 7.91736ZM14.0006 37.2729C14.6003 37.5035 15.5003 37.7789 17.1578 37.851C18.951 37.9285 19.4865 37.9469 24.0262 37.937C28.5659 37.9271 29.1031 37.9094 30.8959 37.8251C32.5513 37.7462 33.4514 37.4674 34.0497 37.2339C34.8433 36.9238 35.4087 36.5559 36.0023 35.9589C36.596 35.3618 36.9649 34.7958 37.2709 34.0018C37.5018 33.4014 37.7765 32.5011 37.8489 30.8435C37.9274 29.0521 37.9434 28.5132 37.9352 23.9756C37.9271 19.4379 37.9077 18.9004 37.8224 17.1075C37.7441 15.4497 37.4661 14.5511 37.2318 13.9537C36.9217 13.1588 36.5535 12.5947 35.9561 12.0004C35.3587 11.4061 34.7933 11.0386 33.9987 10.7325C33.4 10.501 32.4987 10.2267 30.8425 10.1545C29.049 10.0757 28.5104 10.0587 23.9725 10.0686C19.4344 10.0784 18.8973 10.0955 17.1044 10.1804C15.4476 10.2593 14.5486 10.5374 13.9496 10.7714C13.1564 11.0814 12.5903 11.4493 11.9969 12.0466C11.4037 12.644 11.0351 13.2087 10.7291 14.004C10.4989 14.6035 10.2218 15.5045 10.1511 17.1606C10.0726 18.9528 10.0552 19.49 10.0651 24.0286C10.075 28.5673 10.0927 29.1051 10.1769 30.8966C10.2545 32.5541 10.535 33.4531 10.7679 34.0529C11.0779 34.8453 11.4451 35.4132 12.0428 36.0051C12.6406 36.597 13.2064 36.9669 14.0006 37.2729ZM31.3623 16.0471C31.1376 15.7119 31.0173 15.3177 31.0166 14.9142C31.0157 14.3733 31.2297 13.8541 31.6115 13.4709C31.9932 13.0878 32.5116 12.8719 33.0525 12.8708C33.456 12.87 33.8507 12.9889 34.1866 13.2124C34.5226 13.4359 34.7847 13.754 34.9398 14.1266C35.0949 14.499 35.1361 14.9092 35.0581 15.3051C34.9802 15.7009 34.7865 16.0648 34.5017 16.3507C34.2169 16.6365 33.8538 16.8314 33.4581 16.9109C33.0626 16.9904 32.6523 16.9507 32.2792 16.7969C31.9061 16.6432 31.5871 16.3822 31.3623 16.0471ZM24.0163 32.7285C19.1962 32.7377 15.2807 28.8383 15.2712 24.0171C15.262 19.1965 19.1621 15.2804 23.983 15.2709C28.8039 15.2614 32.7203 19.1619 32.7295 23.983C32.7387 28.8042 28.8365 32.7194 24.0163 32.7285ZM19.282 20.8607C18.6612 21.7938 18.331 22.8901 18.3332 24.0109C18.3346 24.7551 18.4825 25.4917 18.7687 26.1787C19.0548 26.8657 19.4734 27.4896 20.0007 28.0149C20.528 28.54 21.1536 28.9562 21.8417 29.2396C22.5298 29.5229 23.267 29.6681 24.0112 29.6665C25.132 29.6643 26.2269 29.3297 27.1576 28.7052C28.0883 28.0807 28.8129 27.1942 29.2397 26.158C29.6666 25.1216 29.7765 23.9819 29.5557 22.8832C29.3348 21.7844 28.7932 20.7758 27.9991 19.9847C27.205 19.1938 26.1942 18.6561 25.0945 18.4397C23.9948 18.2231 22.8557 18.3376 21.821 18.7686C20.7864 19.1996 19.9028 19.9276 19.282 20.8607Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -65,6 +65,17 @@ var Signup = function Signup(_ref) {
|
|
|
65
65
|
moneyBuyCopy = _useState8[0],
|
|
66
66
|
setMoneyBuyCopy = _useState8[1];
|
|
67
67
|
|
|
68
|
+
var _useState9 = (0, _react.useState)(false),
|
|
69
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
70
|
+
popOpen = _useState10[0],
|
|
71
|
+
setPopOpen = _useState10[1]; // In order to keep track of whether the user has ever been shown the popup
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
var _useState11 = (0, _react.useState)(false),
|
|
75
|
+
_useState12 = (0, _slicedToArray2.default)(_useState11, 2),
|
|
76
|
+
popUpShown = _useState12[0],
|
|
77
|
+
setPopUpShown = _useState12[1];
|
|
78
|
+
|
|
68
79
|
(0, _react.useEffect)(function () {
|
|
69
80
|
var givingData = givingType === 'single' ? singleGiving : regularGiving; // Check the 2nd moneybuy exists before using it;
|
|
70
81
|
// 'philantrophy' carts have been set up to use a single moneybuy.
|
|
@@ -91,13 +102,18 @@ var Signup = function Signup(_ref) {
|
|
|
91
102
|
if (errorMsg) setErrorMsg(false);
|
|
92
103
|
setMoneyBuyCopy(moneyBuyNewDescription);
|
|
93
104
|
}
|
|
94
|
-
}, [errorMsg, moneyBuyCopy, singleGiving, regularGiving, givingType, amountDonate, otherDescription]);
|
|
105
|
+
}, [errorMsg, moneyBuyCopy, singleGiving, regularGiving, givingType, amountDonate, otherDescription]); // Updates our flag that differentiates between the popup
|
|
106
|
+
// being *currently* open and it *ever* having been shown to user
|
|
107
|
+
|
|
108
|
+
(0, _react.useEffect)(function () {
|
|
109
|
+
if (popOpen && !popUpShown) setPopUpShown(true);
|
|
110
|
+
}, [popOpen, popUpShown]);
|
|
95
111
|
|
|
96
112
|
var submitDonation = function submitDonation(event, amount, clientId, cartId, mbshipId, donateURL) {
|
|
97
113
|
event.preventDefault();
|
|
98
114
|
|
|
99
115
|
if ((0, _Membership.isAmountValid)(amount) && !errorMsg) {
|
|
100
|
-
(0, _Membership.handleDonateSubmission)(amount, clientId, cartId, mbshipId, donateURL, givingType);
|
|
116
|
+
(0, _Membership.handleDonateSubmission)(amount, clientId, cartId, mbshipId, donateURL, givingType, popUpShown);
|
|
101
117
|
} else {
|
|
102
118
|
setErrorMsg(true);
|
|
103
119
|
setMoneyBuyCopy(false);
|
|
@@ -107,12 +123,6 @@ var Signup = function Signup(_ref) {
|
|
|
107
123
|
|
|
108
124
|
var givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
109
125
|
var showGivingSelector = singleGiving !== null && regularGiving !== null;
|
|
110
|
-
|
|
111
|
-
var _useState9 = (0, _react.useState)(false),
|
|
112
|
-
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
113
|
-
popOpen = _useState10[0],
|
|
114
|
-
setPopOpen = _useState10[1];
|
|
115
|
-
|
|
116
126
|
return /*#__PURE__*/_react.default.createElement(_Donate.FormWrapper, null, showGivingSelector && /*#__PURE__*/_react.default.createElement(_GivingSelector.default, {
|
|
117
127
|
givingType: givingType,
|
|
118
128
|
changeGivingType: function changeGivingType(data) {
|
|
@@ -121,7 +131,8 @@ var Signup = function Signup(_ref) {
|
|
|
121
131
|
setPopOpen: setPopOpen,
|
|
122
132
|
mbshipID: mbshipID
|
|
123
133
|
}), popOpen && /*#__PURE__*/_react.default.createElement(_PopUpComponent.default, {
|
|
124
|
-
PopUpText: PopUpText
|
|
134
|
+
PopUpText: PopUpText,
|
|
135
|
+
setPopOpen: setPopOpen
|
|
125
136
|
}), /*#__PURE__*/_react.default.createElement(_Donate.Form, {
|
|
126
137
|
onSubmit: function onSubmit(e) {
|
|
127
138
|
return submitDonation(e, amountDonate, clientID, cartID, mbshipID, donateLink);
|
|
@@ -23,7 +23,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
var closeDuration = 0.6;
|
|
27
27
|
var fadeClose = (0, _styledComponents.keyframes)(["0%{opacity:1;max-height:350px;}100%{opacity:0;max-height:0px;display:none;margin-top:-16px;}"]);
|
|
28
28
|
var fadeOpen = (0, _styledComponents.keyframes)(["0%{opacity:0;max-height:0px;display:none;margin-top:-16px;}100%{opacity:1;max-height:350px;}"]);
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ var StyledPopUp = _styledComponents.default.div.withConfig({
|
|
|
31
31
|
displayName: "PopUpComponent__StyledPopUp",
|
|
32
32
|
componentId: "sc-1d7imlo-0"
|
|
33
33
|
})(["display:grid;overflow:hidden;max-height:350px;opacity:1;animation:0.4s ", " ease;", " background-color:", ";box-shadow:0px 0px 16px rgba(0,0,0,0.15);border-radius:10px;", "{width:450px;margin-right:auto;margin-left:auto;}"], fadeOpen, function (props) {
|
|
34
|
-
return props.isClosed && (0, _styledComponents.css)(["animation:
|
|
34
|
+
return props.isClosed && (0, _styledComponents.css)(["animation:", "s ", " ease forwards;"], closeDuration, fadeClose);
|
|
35
35
|
}, function (_ref) {
|
|
36
36
|
var theme = _ref.theme;
|
|
37
37
|
return theme.color('blue_light');
|
|
@@ -51,18 +51,28 @@ var Button = _styledComponents.default.button.withConfig({
|
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
var PopUpComponent = function PopUpComponent(_ref3) {
|
|
54
|
-
var PopUpText = _ref3.PopUpText
|
|
54
|
+
var PopUpText = _ref3.PopUpText,
|
|
55
|
+
setPopOpen = _ref3.setPopOpen;
|
|
55
56
|
|
|
56
57
|
var _useState = (0, _react.useState)(false),
|
|
57
58
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
58
59
|
isClosed = _useState2[0],
|
|
59
|
-
setIsClosed = _useState2[1];
|
|
60
|
+
setIsClosed = _useState2[1]; // Only update centralised state - which renders
|
|
61
|
+
// this component - once the closing animation is complete
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
var handleCloser = function handleCloser() {
|
|
65
|
+
setIsClosed(true);
|
|
66
|
+
setTimeout(function () {
|
|
67
|
+
setPopOpen(false);
|
|
68
|
+
}, closeDuration * 1000);
|
|
69
|
+
};
|
|
60
70
|
|
|
61
71
|
return /*#__PURE__*/_react.default.createElement(StyledPopUp, {
|
|
62
72
|
isClosed: isClosed
|
|
63
73
|
}, /*#__PURE__*/_react.default.createElement(Button, {
|
|
64
74
|
onClick: function onClick() {
|
|
65
|
-
return
|
|
75
|
+
return handleCloser();
|
|
66
76
|
},
|
|
67
77
|
"aria-label": "Close"
|
|
68
78
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
@@ -16,6 +16,15 @@ var GivingSelector = function GivingSelector(_ref) {
|
|
|
16
16
|
changeGivingType = _ref.changeGivingType,
|
|
17
17
|
setPopOpen = _ref.setPopOpen,
|
|
18
18
|
mbshipID = _ref.mbshipID;
|
|
19
|
+
|
|
20
|
+
// Only updates giving type and popup status when appropriate
|
|
21
|
+
var handleGivingTypeChange = function handleGivingTypeChange(thisButtonType, currentGivingType) {
|
|
22
|
+
if (currentGivingType !== thisButtonType) {
|
|
23
|
+
changeGivingType(thisButtonType);
|
|
24
|
+
setPopOpen(thisButtonType === 'single');
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
19
28
|
return /*#__PURE__*/_react.default.createElement(_GivingSelector.Wrapper, null, /*#__PURE__*/_react.default.createElement(_GivingSelector.MoneyBox, null, /*#__PURE__*/_react.default.createElement("input", {
|
|
20
29
|
className: "give-once",
|
|
21
30
|
"aria-label": "Single",
|
|
@@ -26,8 +35,7 @@ var GivingSelector = function GivingSelector(_ref) {
|
|
|
26
35
|
errormsg: "",
|
|
27
36
|
checked: givingType === 'single',
|
|
28
37
|
onClick: function onClick() {
|
|
29
|
-
|
|
30
|
-
setPopOpen(true);
|
|
38
|
+
return handleGivingTypeChange('single', givingType);
|
|
31
39
|
}
|
|
32
40
|
}), /*#__PURE__*/_react.default.createElement(_GivingSelector.Label, {
|
|
33
41
|
active: givingType === 'single',
|
|
@@ -42,8 +50,7 @@ var GivingSelector = function GivingSelector(_ref) {
|
|
|
42
50
|
errormsg: "",
|
|
43
51
|
checked: givingType === 'monthly',
|
|
44
52
|
onClick: function onClick() {
|
|
45
|
-
|
|
46
|
-
setPopOpen(false);
|
|
53
|
+
return handleGivingTypeChange('monthly', givingType);
|
|
47
54
|
}
|
|
48
55
|
}), /*#__PURE__*/_react.default.createElement(_GivingSelector.Label, {
|
|
49
56
|
active: givingType === 'monthly',
|
|
@@ -596,13 +596,13 @@ exports[`renders correctly 1`] = `
|
|
|
596
596
|
<a
|
|
597
597
|
className="c5"
|
|
598
598
|
data-test="header-esu-icon"
|
|
599
|
-
href="https://
|
|
599
|
+
href="https://www.instagram.com/comicrelief"
|
|
600
600
|
rel="noopener noreferrer"
|
|
601
601
|
target="_blank"
|
|
602
|
-
title="Check out our
|
|
602
|
+
title="Check out our Instagram account"
|
|
603
603
|
>
|
|
604
604
|
<img
|
|
605
|
-
alt="
|
|
605
|
+
alt="instagram"
|
|
606
606
|
className="c6"
|
|
607
607
|
src="mock.asset"
|
|
608
608
|
/>
|
|
@@ -619,13 +619,13 @@ exports[`renders correctly 1`] = `
|
|
|
619
619
|
<a
|
|
620
620
|
className="c5"
|
|
621
621
|
data-test="header-esu-icon"
|
|
622
|
-
href="https://
|
|
622
|
+
href="https://twitter.com/comicrelief"
|
|
623
623
|
rel="noopener noreferrer"
|
|
624
624
|
target="_blank"
|
|
625
|
-
title="Check out our
|
|
625
|
+
title="Check out our Twitter account"
|
|
626
626
|
>
|
|
627
627
|
<img
|
|
628
|
-
alt="
|
|
628
|
+
alt="twitter"
|
|
629
629
|
className="c6"
|
|
630
630
|
src="mock.asset"
|
|
631
631
|
/>
|
|
@@ -642,13 +642,13 @@ exports[`renders correctly 1`] = `
|
|
|
642
642
|
<a
|
|
643
643
|
className="c5"
|
|
644
644
|
data-test="header-esu-icon"
|
|
645
|
-
href="https://www.
|
|
645
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
646
646
|
rel="noopener noreferrer"
|
|
647
647
|
target="_blank"
|
|
648
|
-
title="Check out our
|
|
648
|
+
title="Check out our YouTube channel"
|
|
649
649
|
>
|
|
650
650
|
<img
|
|
651
|
-
alt="
|
|
651
|
+
alt="youtube"
|
|
652
652
|
className="c6"
|
|
653
653
|
src="mock.asset"
|
|
654
654
|
/>
|
package/dist/utils/Membership.js
CHANGED
|
@@ -42,6 +42,7 @@ exports.isInputMatchBoxValue = isInputMatchBoxValue;
|
|
|
42
42
|
|
|
43
43
|
var handleDonateSubmission = function handleDonateSubmission(amount, clientID, cartID, mbshipID, donateLink) {
|
|
44
44
|
var givingType = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'monthly';
|
|
45
|
+
var popUpShown = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;
|
|
45
46
|
var currentpageUrl = window.location.href;
|
|
46
47
|
var affiliateValue = getUrlParameter(currentpageUrl);
|
|
47
48
|
var reg = /[#?|[\]\\]/g;
|
|
@@ -52,7 +53,7 @@ var handleDonateSubmission = function handleDonateSubmission(amount, clientID, c
|
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
var givingTypeUrl = givingType === 'single' ? 'single' : 'monthly';
|
|
55
|
-
window.location.href = "".concat(donateLink, "?clientOverride=").concat(clientID, "&amount=").concat(amount, "¤cy=GBP&givingType=").concat(givingTypeUrl, "&cartId=").concat(cartID, "&affiliate=").concat(affiliateValue, "&siteurl=").concat(currentpageUrl, "&rowID=").concat(mbshipID);
|
|
56
|
+
window.location.href = "".concat(donateLink, "?clientOverride=").concat(clientID, "&amount=").concat(amount, "¤cy=GBP&givingType=").concat(givingTypeUrl, "&cartId=").concat(cartID, "&affiliate=").concat(affiliateValue, "&siteurl=").concat(currentpageUrl, "&rowID=").concat(mbshipID, "&popUpShown=").concat(popUpShown);
|
|
56
57
|
};
|
|
57
58
|
|
|
58
59
|
exports.handleDonateSubmission = handleDonateSubmission;
|
package/package.json
CHANGED
|
@@ -104,13 +104,13 @@ exports[`renders correctly with Comic Relief links 1`] = `
|
|
|
104
104
|
<a
|
|
105
105
|
className="c2"
|
|
106
106
|
data-test="header-esu-icon"
|
|
107
|
-
href="https://
|
|
107
|
+
href="https://www.instagram.com/comicrelief"
|
|
108
108
|
rel="noopener noreferrer"
|
|
109
109
|
target="_blank"
|
|
110
|
-
title="Check out our
|
|
110
|
+
title="Check out our Instagram account"
|
|
111
111
|
>
|
|
112
112
|
<img
|
|
113
|
-
alt="
|
|
113
|
+
alt="instagram"
|
|
114
114
|
className="c3"
|
|
115
115
|
src="mock.asset"
|
|
116
116
|
/>
|
|
@@ -127,13 +127,13 @@ exports[`renders correctly with Comic Relief links 1`] = `
|
|
|
127
127
|
<a
|
|
128
128
|
className="c2"
|
|
129
129
|
data-test="header-esu-icon"
|
|
130
|
-
href="https://
|
|
130
|
+
href="https://twitter.com/comicrelief"
|
|
131
131
|
rel="noopener noreferrer"
|
|
132
132
|
target="_blank"
|
|
133
|
-
title="Check out our
|
|
133
|
+
title="Check out our Twitter account"
|
|
134
134
|
>
|
|
135
135
|
<img
|
|
136
|
-
alt="
|
|
136
|
+
alt="twitter"
|
|
137
137
|
className="c3"
|
|
138
138
|
src="mock.asset"
|
|
139
139
|
/>
|
|
@@ -150,13 +150,13 @@ exports[`renders correctly with Comic Relief links 1`] = `
|
|
|
150
150
|
<a
|
|
151
151
|
className="c2"
|
|
152
152
|
data-test="header-esu-icon"
|
|
153
|
-
href="https://www.
|
|
153
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
154
154
|
rel="noopener noreferrer"
|
|
155
155
|
target="_blank"
|
|
156
|
-
title="Check out our
|
|
156
|
+
title="Check out our YouTube channel"
|
|
157
157
|
>
|
|
158
158
|
<img
|
|
159
|
-
alt="
|
|
159
|
+
alt="youtube"
|
|
160
160
|
className="c3"
|
|
161
161
|
src="mock.asset"
|
|
162
162
|
/>
|
|
@@ -274,13 +274,13 @@ exports[`renders correctly with Red Nose Day links and self target 1`] = `
|
|
|
274
274
|
<a
|
|
275
275
|
className="c2"
|
|
276
276
|
data-test="header-esu-icon"
|
|
277
|
-
href="https://
|
|
277
|
+
href="https://www.instagram.com/rednoseday"
|
|
278
278
|
rel="noopener noreferrer"
|
|
279
279
|
target="_self"
|
|
280
|
-
title="Check out our
|
|
280
|
+
title="Check out our Instagram account"
|
|
281
281
|
>
|
|
282
282
|
<img
|
|
283
|
-
alt="
|
|
283
|
+
alt="instagram"
|
|
284
284
|
className="c3"
|
|
285
285
|
src="mock.asset"
|
|
286
286
|
/>
|
|
@@ -297,13 +297,13 @@ exports[`renders correctly with Red Nose Day links and self target 1`] = `
|
|
|
297
297
|
<a
|
|
298
298
|
className="c2"
|
|
299
299
|
data-test="header-esu-icon"
|
|
300
|
-
href="https://
|
|
300
|
+
href="https://twitter.com/rednoseday"
|
|
301
301
|
rel="noopener noreferrer"
|
|
302
302
|
target="_self"
|
|
303
|
-
title="Check out our
|
|
303
|
+
title="Check out our Twitter account"
|
|
304
304
|
>
|
|
305
305
|
<img
|
|
306
|
-
alt="
|
|
306
|
+
alt="twitter"
|
|
307
307
|
className="c3"
|
|
308
308
|
src="mock.asset"
|
|
309
309
|
/>
|
|
@@ -320,13 +320,13 @@ exports[`renders correctly with Red Nose Day links and self target 1`] = `
|
|
|
320
320
|
<a
|
|
321
321
|
className="c2"
|
|
322
322
|
data-test="header-esu-icon"
|
|
323
|
-
href="https://www.
|
|
323
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
324
324
|
rel="noopener noreferrer"
|
|
325
325
|
target="_self"
|
|
326
|
-
title="Check out our
|
|
326
|
+
title="Check out our YouTube channel"
|
|
327
327
|
>
|
|
328
328
|
<img
|
|
329
|
-
alt="
|
|
329
|
+
alt="youtube"
|
|
330
330
|
className="c3"
|
|
331
331
|
src="mock.asset"
|
|
332
332
|
/>
|
|
@@ -444,13 +444,13 @@ exports[`renders correctly with Sport Relief links 1`] = `
|
|
|
444
444
|
<a
|
|
445
445
|
className="c2"
|
|
446
446
|
data-test="header-esu-icon"
|
|
447
|
-
href="https://
|
|
447
|
+
href="https://www.instagram.com/sportrelief"
|
|
448
448
|
rel="noopener noreferrer"
|
|
449
449
|
target="_blank"
|
|
450
|
-
title="Check out our
|
|
450
|
+
title="Check out our Instagram account"
|
|
451
451
|
>
|
|
452
452
|
<img
|
|
453
|
-
alt="
|
|
453
|
+
alt="instagram"
|
|
454
454
|
className="c3"
|
|
455
455
|
src="mock.asset"
|
|
456
456
|
/>
|
|
@@ -467,13 +467,13 @@ exports[`renders correctly with Sport Relief links 1`] = `
|
|
|
467
467
|
<a
|
|
468
468
|
className="c2"
|
|
469
469
|
data-test="header-esu-icon"
|
|
470
|
-
href="https://
|
|
470
|
+
href="https://twitter.com/sportrelief"
|
|
471
471
|
rel="noopener noreferrer"
|
|
472
472
|
target="_blank"
|
|
473
|
-
title="Check out our
|
|
473
|
+
title="Check out our Twitter account"
|
|
474
474
|
>
|
|
475
475
|
<img
|
|
476
|
-
alt="
|
|
476
|
+
alt="twitter"
|
|
477
477
|
className="c3"
|
|
478
478
|
src="mock.asset"
|
|
479
479
|
/>
|
|
@@ -490,13 +490,13 @@ exports[`renders correctly with Sport Relief links 1`] = `
|
|
|
490
490
|
<a
|
|
491
491
|
className="c2"
|
|
492
492
|
data-test="header-esu-icon"
|
|
493
|
-
href="https://www.
|
|
493
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
494
494
|
rel="noopener noreferrer"
|
|
495
495
|
target="_blank"
|
|
496
|
-
title="Check out our
|
|
496
|
+
title="Check out our YouTube channel"
|
|
497
497
|
>
|
|
498
498
|
<img
|
|
499
|
-
alt="
|
|
499
|
+
alt="youtube"
|
|
500
500
|
className="c3"
|
|
501
501
|
src="mock.asset"
|
|
502
502
|
/>
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
<svg
|
|
1
|
+
<svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M24 48C37.2548 48 48 37.2549 48 24C48 10.7451 37.2548 0 24 0C10.7452 0 0 10.7451 0 24C0 37.2549 10.7452 48 24 48ZM12.8354 7.91736C13.9153 7.49304 15.1505 7.20435 16.9593 7.11902C18.7725 7.03064 19.3505 7.01086 23.9673 7.00208C28.5842 6.99329 29.1666 7.01331 30.9761 7.09155C32.7856 7.16968 34.0215 7.45496 35.1034 7.87354C36.223 8.30457 37.1723 8.88428 38.1182 9.82788C39.064 10.7714 39.6472 11.7175 40.084 12.8351C40.5081 13.916 40.796 15.1471 40.882 16.96C40.9681 18.7728 40.9888 19.3516 40.9976 23.9674C41.0065 28.5833 40.9878 29.1626 40.9086 30.9772C40.83 32.7853 40.5454 34.0219 40.1265 35.103C39.6944 36.223 39.1144 37.1716 38.1722 38.1182C37.2301 39.0648 36.2825 39.6476 35.1649 40.0847C34.0844 40.5071 32.856 40.7968 31.0428 40.8827C29.2296 40.9688 28.6485 40.9891 24.0333 40.998C19.4182 41.0068 18.8358 40.9885 17.0262 40.9093C15.2168 40.8301 13.9802 40.5452 12.899 40.1273C11.777 39.6941 10.8298 39.1151 9.88354 38.1722C8.93732 37.2295 8.35352 36.2826 7.9173 35.1649C7.49298 34.0848 7.20532 32.8499 7.11902 31.0415C7.03125 29.2279 7.01086 28.6492 7.00201 24.0327C6.99316 19.4161 7.01086 18.8345 7.09076 17.0247C7.17065 15.2148 7.45422 13.9785 7.87274 12.8964C8.30524 11.7771 8.88562 10.8291 9.82812 9.8833C10.7706 8.93738 11.7178 8.35291 12.8354 7.91736ZM14.0006 37.2729C14.6003 37.5035 15.5003 37.7789 17.1578 37.851C18.951 37.9285 19.4865 37.9469 24.0262 37.937C28.5659 37.9271 29.1031 37.9094 30.8959 37.8251C32.5513 37.7462 33.4514 37.4674 34.0497 37.2339C34.8433 36.9238 35.4087 36.5559 36.0023 35.9589C36.596 35.3618 36.9649 34.7958 37.2709 34.0018C37.5018 33.4014 37.7765 32.5011 37.8489 30.8435C37.9274 29.0521 37.9434 28.5132 37.9352 23.9756C37.9271 19.4379 37.9077 18.9004 37.8224 17.1075C37.7441 15.4497 37.4661 14.5511 37.2318 13.9537C36.9217 13.1588 36.5535 12.5947 35.9561 12.0004C35.3587 11.4061 34.7933 11.0386 33.9987 10.7325C33.4 10.501 32.4987 10.2267 30.8425 10.1545C29.049 10.0757 28.5104 10.0587 23.9725 10.0686C19.4344 10.0784 18.8973 10.0955 17.1044 10.1804C15.4476 10.2593 14.5486 10.5374 13.9496 10.7714C13.1564 11.0814 12.5903 11.4493 11.9969 12.0466C11.4037 12.644 11.0351 13.2087 10.7291 14.004C10.4989 14.6035 10.2218 15.5045 10.1511 17.1606C10.0726 18.9528 10.0552 19.49 10.0651 24.0286C10.075 28.5673 10.0927 29.1051 10.1769 30.8966C10.2545 32.5541 10.535 33.4531 10.7679 34.0529C11.0779 34.8453 11.4451 35.4132 12.0428 36.0051C12.6406 36.597 13.2064 36.9669 14.0006 37.2729ZM31.3623 16.0471C31.1376 15.7119 31.0173 15.3177 31.0166 14.9142C31.0157 14.3733 31.2297 13.8541 31.6115 13.4709C31.9932 13.0878 32.5116 12.8719 33.0525 12.8708C33.456 12.87 33.8507 12.9889 34.1866 13.2124C34.5226 13.4359 34.7847 13.754 34.9398 14.1266C35.0949 14.499 35.1361 14.9092 35.0581 15.3051C34.9802 15.7009 34.7865 16.0648 34.5017 16.3507C34.2169 16.6365 33.8538 16.8314 33.4581 16.9109C33.0626 16.9904 32.6523 16.9507 32.2792 16.7969C31.9061 16.6432 31.5871 16.3822 31.3623 16.0471ZM24.0163 32.7285C19.1962 32.7377 15.2807 28.8383 15.2712 24.0171C15.262 19.1965 19.1621 15.2804 23.983 15.2709C28.8039 15.2614 32.7203 19.1619 32.7295 23.983C32.7387 28.8042 28.8365 32.7194 24.0163 32.7285ZM19.282 20.8607C18.6612 21.7938 18.331 22.8901 18.3332 24.0109C18.3346 24.7551 18.4825 25.4917 18.7687 26.1787C19.0548 26.8657 19.4734 27.4896 20.0007 28.0149C20.528 28.54 21.1536 28.9562 21.8417 29.2396C22.5298 29.5229 23.267 29.6681 24.0112 29.6665C25.132 29.6643 26.2269 29.3297 27.1576 28.7052C28.0883 28.0807 28.8129 27.1942 29.2397 26.158C29.6666 25.1216 29.7765 23.9819 29.5557 22.8832C29.3348 21.7844 28.7932 20.7758 27.9991 19.9847C27.205 19.1938 26.1942 18.6561 25.0945 18.4397C23.9948 18.2231 22.8557 18.3376 21.821 18.7686C20.7864 19.1996 19.9028 19.9276 19.282 20.8607Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -39,6 +39,9 @@ const Signup = ({
|
|
|
39
39
|
const [errorMsg, setErrorMsg] = useState(false);
|
|
40
40
|
const [amountDonate, setAmountDonate] = useState(' ');
|
|
41
41
|
const [moneyBuyCopy, setMoneyBuyCopy] = useState(true);
|
|
42
|
+
const [popOpen, setPopOpen] = useState(false);
|
|
43
|
+
// In order to keep track of whether the user has ever been shown the popup
|
|
44
|
+
const [popUpShown, setPopUpShown] = useState(false);
|
|
42
45
|
|
|
43
46
|
useEffect(() => {
|
|
44
47
|
const givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
@@ -88,6 +91,12 @@ const Signup = ({
|
|
|
88
91
|
otherDescription
|
|
89
92
|
]);
|
|
90
93
|
|
|
94
|
+
// Updates our flag that differentiates between the popup
|
|
95
|
+
// being *currently* open and it *ever* having been shown to user
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (popOpen && !popUpShown) setPopUpShown(true);
|
|
98
|
+
}, [popOpen, popUpShown]);
|
|
99
|
+
|
|
91
100
|
const submitDonation = (
|
|
92
101
|
event,
|
|
93
102
|
amount,
|
|
@@ -104,7 +113,8 @@ const Signup = ({
|
|
|
104
113
|
cartId,
|
|
105
114
|
mbshipId,
|
|
106
115
|
donateURL,
|
|
107
|
-
givingType
|
|
116
|
+
givingType,
|
|
117
|
+
popUpShown
|
|
108
118
|
);
|
|
109
119
|
} else {
|
|
110
120
|
setErrorMsg(true);
|
|
@@ -116,8 +126,6 @@ const Signup = ({
|
|
|
116
126
|
const givingData = givingType === 'single' ? singleGiving : regularGiving;
|
|
117
127
|
const showGivingSelector = singleGiving !== null && regularGiving !== null;
|
|
118
128
|
|
|
119
|
-
const [popOpen, setPopOpen] = useState(false);
|
|
120
|
-
|
|
121
129
|
return (
|
|
122
130
|
<FormWrapper>
|
|
123
131
|
{showGivingSelector && (
|
|
@@ -129,7 +137,7 @@ const Signup = ({
|
|
|
129
137
|
/>
|
|
130
138
|
)}
|
|
131
139
|
|
|
132
|
-
{ popOpen && <PopUpComponent PopUpText={PopUpText} /> }
|
|
140
|
+
{ popOpen && <PopUpComponent PopUpText={PopUpText} setPopOpen={setPopOpen} /> }
|
|
133
141
|
|
|
134
142
|
<Form
|
|
135
143
|
onSubmit={e => submitDonation(
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
import React, { useState } from 'react';
|
|
3
2
|
import styled, { css, keyframes } from 'styled-components';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
4
|
import Text from '../../../Atoms/Text/Text';
|
|
5
5
|
import { media } from '../../../../theme/shared/size';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import CloseCross from '../assets/close.svg';
|
|
8
7
|
|
|
8
|
+
const closeDuration = 0.6;
|
|
9
|
+
|
|
9
10
|
const fadeClose = keyframes`
|
|
10
11
|
0% {
|
|
11
12
|
opacity: 1;
|
|
@@ -39,7 +40,7 @@ const StyledPopUp = styled.div`
|
|
|
39
40
|
opacity: 1;
|
|
40
41
|
animation: 0.4s ${fadeOpen} ease;
|
|
41
42
|
${props => props.isClosed && css`
|
|
42
|
-
animation:
|
|
43
|
+
animation: ${closeDuration}s ${fadeClose} ease forwards;
|
|
43
44
|
`}
|
|
44
45
|
background-color: ${({ theme }) => theme.color('blue_light')};
|
|
45
46
|
box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
|
|
@@ -78,23 +79,33 @@ const Button = styled.button`
|
|
|
78
79
|
}
|
|
79
80
|
`;
|
|
80
81
|
|
|
81
|
-
const PopUpComponent = ({ PopUpText }) => {
|
|
82
|
+
const PopUpComponent = ({ PopUpText, setPopOpen }) => {
|
|
82
83
|
const [isClosed, setIsClosed] = useState(false);
|
|
83
84
|
|
|
85
|
+
// Only update centralised state - which renders
|
|
86
|
+
// this component - once the closing animation is complete
|
|
87
|
+
const handleCloser = () => {
|
|
88
|
+
setIsClosed(true);
|
|
89
|
+
setTimeout(() => {
|
|
90
|
+
setPopOpen(false);
|
|
91
|
+
}, closeDuration * 1000);
|
|
92
|
+
};
|
|
93
|
+
|
|
84
94
|
return (
|
|
85
95
|
<StyledPopUp isClosed={isClosed}>
|
|
86
|
-
<Button onClick={() =>
|
|
87
|
-
<img src={CloseCross} alt="Close cross icon"/>
|
|
96
|
+
<Button onClick={() => handleCloser()} aria-label="Close">
|
|
97
|
+
<img src={CloseCross} alt="Close cross icon" />
|
|
88
98
|
</Button>
|
|
89
99
|
<TextWrapper>
|
|
90
100
|
<Text>{ PopUpText }</Text>
|
|
91
101
|
</TextWrapper>
|
|
92
102
|
</StyledPopUp>
|
|
93
|
-
)
|
|
103
|
+
);
|
|
94
104
|
};
|
|
95
105
|
|
|
96
106
|
PopUpComponent.propTypes = {
|
|
97
|
-
PopUpText: PropTypes.string.isRequired
|
|
107
|
+
PopUpText: PropTypes.string.isRequired,
|
|
108
|
+
setPopOpen: PropTypes.func.isRequired
|
|
98
109
|
};
|
|
99
110
|
|
|
100
111
|
export default PopUpComponent;
|
|
@@ -7,47 +7,51 @@ import {
|
|
|
7
7
|
|
|
8
8
|
const GivingSelector = ({
|
|
9
9
|
givingType, changeGivingType, setPopOpen, mbshipID
|
|
10
|
-
}) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
10
|
+
}) => {
|
|
11
|
+
// Only updates giving type and popup status when appropriate
|
|
12
|
+
const handleGivingTypeChange = (thisButtonType, currentGivingType) => {
|
|
13
|
+
if (currentGivingType !== thisButtonType) {
|
|
14
|
+
changeGivingType(thisButtonType);
|
|
15
|
+
setPopOpen(thisButtonType === 'single');
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Wrapper>
|
|
21
|
+
<MoneyBox>
|
|
22
|
+
<input
|
|
23
|
+
className="give-once"
|
|
24
|
+
aria-label="Single"
|
|
25
|
+
id={`give-once--${mbshipID}`}
|
|
26
|
+
value="Single"
|
|
27
|
+
type="radio"
|
|
28
|
+
label=""
|
|
29
|
+
errormsg=""
|
|
30
|
+
checked={givingType === 'single'}
|
|
31
|
+
onClick={() => handleGivingTypeChange('single', givingType)}
|
|
32
|
+
/>
|
|
33
|
+
<Label active={givingType === 'single'} htmlFor={`give-once--${mbshipID}`}>
|
|
34
|
+
Single
|
|
35
|
+
</Label>
|
|
36
|
+
<input
|
|
37
|
+
className="give-monthly"
|
|
38
|
+
aria-label="Monthly"
|
|
39
|
+
id={`give-monthly--${mbshipID}`}
|
|
40
|
+
value="Monthly"
|
|
41
|
+
type="radio"
|
|
42
|
+
label=""
|
|
43
|
+
errormsg=""
|
|
44
|
+
checked={givingType === 'monthly'}
|
|
45
|
+
onClick={() => handleGivingTypeChange('monthly', givingType)}
|
|
46
|
+
/>
|
|
47
|
+
<Label active={givingType === 'monthly'} htmlFor={`give-monthly--${mbshipID}`}>
|
|
48
|
+
Monthly
|
|
49
|
+
</Label>
|
|
50
|
+
<Switch />
|
|
51
|
+
</MoneyBox>
|
|
52
|
+
</Wrapper>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
51
55
|
|
|
52
56
|
GivingSelector.propTypes = {
|
|
53
57
|
givingType: PropTypes.string.isRequired,
|
|
@@ -596,13 +596,13 @@ exports[`renders correctly 1`] = `
|
|
|
596
596
|
<a
|
|
597
597
|
className="c5"
|
|
598
598
|
data-test="header-esu-icon"
|
|
599
|
-
href="https://
|
|
599
|
+
href="https://www.instagram.com/comicrelief"
|
|
600
600
|
rel="noopener noreferrer"
|
|
601
601
|
target="_blank"
|
|
602
|
-
title="Check out our
|
|
602
|
+
title="Check out our Instagram account"
|
|
603
603
|
>
|
|
604
604
|
<img
|
|
605
|
-
alt="
|
|
605
|
+
alt="instagram"
|
|
606
606
|
className="c6"
|
|
607
607
|
src="mock.asset"
|
|
608
608
|
/>
|
|
@@ -619,13 +619,13 @@ exports[`renders correctly 1`] = `
|
|
|
619
619
|
<a
|
|
620
620
|
className="c5"
|
|
621
621
|
data-test="header-esu-icon"
|
|
622
|
-
href="https://
|
|
622
|
+
href="https://twitter.com/comicrelief"
|
|
623
623
|
rel="noopener noreferrer"
|
|
624
624
|
target="_blank"
|
|
625
|
-
title="Check out our
|
|
625
|
+
title="Check out our Twitter account"
|
|
626
626
|
>
|
|
627
627
|
<img
|
|
628
|
-
alt="
|
|
628
|
+
alt="twitter"
|
|
629
629
|
className="c6"
|
|
630
630
|
src="mock.asset"
|
|
631
631
|
/>
|
|
@@ -642,13 +642,13 @@ exports[`renders correctly 1`] = `
|
|
|
642
642
|
<a
|
|
643
643
|
className="c5"
|
|
644
644
|
data-test="header-esu-icon"
|
|
645
|
-
href="https://www.
|
|
645
|
+
href="https://www.youtube.com/channel/UCdF5u0ggeSETozc8fsprjcw"
|
|
646
646
|
rel="noopener noreferrer"
|
|
647
647
|
target="_blank"
|
|
648
|
-
title="Check out our
|
|
648
|
+
title="Check out our YouTube channel"
|
|
649
649
|
>
|
|
650
650
|
<img
|
|
651
|
-
alt="
|
|
651
|
+
alt="youtube"
|
|
652
652
|
className="c6"
|
|
653
653
|
src="mock.asset"
|
|
654
654
|
/>
|
package/src/utils/Membership.js
CHANGED
|
@@ -42,7 +42,8 @@ const handleDonateSubmission = (
|
|
|
42
42
|
cartID,
|
|
43
43
|
mbshipID,
|
|
44
44
|
donateLink,
|
|
45
|
-
givingType = 'monthly'
|
|
45
|
+
givingType = 'monthly',
|
|
46
|
+
popUpShown = null
|
|
46
47
|
) => {
|
|
47
48
|
let currentpageUrl = window.location.href;
|
|
48
49
|
const affiliateValue = getUrlParameter(currentpageUrl);
|
|
@@ -56,7 +57,7 @@ const handleDonateSubmission = (
|
|
|
56
57
|
}
|
|
57
58
|
const givingTypeUrl = givingType === 'single' ? 'single' : 'monthly';
|
|
58
59
|
|
|
59
|
-
window.location.href = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}`;
|
|
60
|
+
window.location.href = `${donateLink}?clientOverride=${clientID}&amount=${amount}¤cy=GBP&givingType=${givingTypeUrl}&cartId=${cartID}&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${mbshipID}&popUpShown=${popUpShown}`;
|
|
60
61
|
};
|
|
61
62
|
|
|
62
63
|
export {
|