@comicrelief/component-library 7.23.2 → 7.23.4

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.
@@ -41,7 +41,8 @@ var ImpactSlider = function ImpactSlider(_ref) {
41
41
  (0, _utils.default)(currentAmount, donateLink, cartID, rowID);
42
42
  };
43
43
  return /*#__PURE__*/_react.default.createElement(_ImpactSlider.OuterWrapper, {
44
- backgroundColour: backgroundColour
44
+ backgroundColour: backgroundColour,
45
+ id: rowID
45
46
  }, /*#__PURE__*/_react.default.createElement(_ImpactSlider.InnerWrapper, null, /*#__PURE__*/_react.default.createElement(_Text.default, {
46
47
  tag: "h1",
47
48
  family: "Anton",
@@ -7,7 +7,7 @@ import Text from '../../Atoms/Text/Text';
7
7
  <ImpactSlider
8
8
  heading="Your donations will change lives"
9
9
  donateLink="https://donation-staging.spa.comicrelief.com"
10
- rowID="to-come-from-the-cms"
10
+ rowID="c7ba23a5-0594-5da4-a14b-8ea87f41db43"
11
11
  cartID="to-also-come-from-the-cms"
12
12
  items={testImpactSliderItems}
13
13
  step={5}
@@ -28,7 +28,7 @@ import Text from '../../Atoms/Text/Text';
28
28
  <ImpactSlider
29
29
  heading="Your donations will change lives"
30
30
  donateLink="https://donation-staging.spa.comicrelief.com"
31
- rowID="to-come-from-the-cms"
31
+ rowID="d7ba23a5-0594-5da4-a14b-8ea87f41db43"
32
32
  cartID="to-also-come-from-the-cms"
33
33
  items={testImpactSliderItems}
34
34
  step={5}
@@ -19,12 +19,7 @@ var handleSubmission = function handleSubmission(amount, donateLink, cartID, row
19
19
  var thisMatch = currentpageUrl.match(reg)[0];
20
20
  currentpageUrl = currentpageUrl.substring(0, currentpageUrl.indexOf(thisMatch));
21
21
  }
22
-
23
- // - Q: do we need client IDs? A: 99% of examples just use 'donate' (or 'test' for staging)
24
- //
25
- // - I guess we still need rowID for the back-browsing scroll stuff?
26
- // - TO-DO: add in said scroll stuff
27
- var forwardingUrl = "".concat(donateLink, "/?cartID=").concat(cartID, "&amount=").concat(amount, "&clientOverride=donate&currency=GBP&givingType=single&affiliate=").concat(affiliateValue, "&siteurl=").concat(currentpageUrl, "&rowID=").concat(rowID);
22
+ var forwardingUrl = "".concat(donateLink, "/?cartId=").concat(cartID, "&amount=").concat(amount, "&clientOverride=donate&currency=GBP&givingType=single&affiliate=").concat(affiliateValue, "&siteurl=").concat(currentpageUrl, "&rowID=").concat(rowID);
28
23
  window.location.href = forwardingUrl;
29
24
  };
30
25
  var _default = exports.default = handleSubmission;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "7.23.2",
4
+ "version": "7.23.4",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -28,7 +28,7 @@ const ImpactSlider = ({
28
28
  };
29
29
 
30
30
  return (
31
- <OuterWrapper backgroundColour={backgroundColour}>
31
+ <OuterWrapper backgroundColour={backgroundColour} id={rowID}>
32
32
  <InnerWrapper>
33
33
  <Text tag="h1" family="Anton" uppercase weight="normal" size="xl">{heading}</Text>
34
34
  <Copy>
@@ -7,7 +7,7 @@ import Text from '../../Atoms/Text/Text';
7
7
  <ImpactSlider
8
8
  heading="Your donations will change lives"
9
9
  donateLink="https://donation-staging.spa.comicrelief.com"
10
- rowID="to-come-from-the-cms"
10
+ rowID="c7ba23a5-0594-5da4-a14b-8ea87f41db43"
11
11
  cartID="to-also-come-from-the-cms"
12
12
  items={testImpactSliderItems}
13
13
  step={5}
@@ -28,7 +28,7 @@ import Text from '../../Atoms/Text/Text';
28
28
  <ImpactSlider
29
29
  heading="Your donations will change lives"
30
30
  donateLink="https://donation-staging.spa.comicrelief.com"
31
- rowID="to-come-from-the-cms"
31
+ rowID="d7ba23a5-0594-5da4-a14b-8ea87f41db43"
32
32
  cartID="to-also-come-from-the-cms"
33
33
  items={testImpactSliderItems}
34
34
  step={5}
@@ -20,11 +20,7 @@ const handleSubmission = (amount, donateLink, cartID, rowID) => {
20
20
  currentpageUrl = currentpageUrl.substring(0, currentpageUrl.indexOf(thisMatch));
21
21
  }
22
22
 
23
- // - Q: do we need client IDs? A: 99% of examples just use 'donate' (or 'test' for staging)
24
- //
25
- // - I guess we still need rowID for the back-browsing scroll stuff?
26
- // - TO-DO: add in said scroll stuff
27
- const forwardingUrl = `${donateLink}/?cartID=${cartID}&amount=${amount}&clientOverride=donate&currency=GBP&givingType=single&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${rowID}`;
23
+ const forwardingUrl = `${donateLink}/?cartId=${cartID}&amount=${amount}&clientOverride=donate&currency=GBP&givingType=single&affiliate=${affiliateValue}&siteurl=${currentpageUrl}&rowID=${rowID}`;
28
24
 
29
25
  window.location.href = forwardingUrl;
30
26
  };