@rileybathurst/paddle 1.2.1 → 1.2.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "1.2.1",
4
+ "version": "1.2.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -22,8 +22,8 @@ interface BadgeTypes {
22
22
  demo: boolean;
23
23
  discount?: number;
24
24
  }
25
+ // TODO: deal with multiple
25
26
  const Badges = ({ inflatable, demo, discount }: BadgeTypes) => {
26
- // TODO: deal with multiple
27
27
  if (discount) {
28
28
  return (
29
29
  <div className="badge">
@@ -82,13 +82,14 @@ export const PaddlePurchase = ({ id, title, slug, excerpt, length, width, inflat
82
82
  to={`/retail/${sportSlug}/${brandSlug}/${slug}`}
83
83
  className="image-link"
84
84
  >
85
- <GatsbyImage
86
- image={cutout?.localFile?.childImageSharp?.gatsbyImageData}
87
- alt={cutout?.alternativeText || `${title} by ${brandSlug}`}
88
- className="cutout"
89
- objectFit="contain"
90
- // TODO: this has been causing some problems but keep an eye on it
91
- />
85
+ {cutout && (
86
+ <GatsbyImage
87
+ image={cutout.localFile?.childImageSharp?.gatsbyImageData}
88
+ alt={cutout.alternativeText || `${title} by ${brandSlug}`}
89
+ className="cutout"
90
+ objectFit="contain"
91
+ />
92
+ )}
92
93
  </Link>
93
94
  <Badges
94
95
  inflatable={inflatable}
@@ -18,19 +18,19 @@ export const PaddleTextureBackgrounds = ({ baseOne, baseTwo, baseThree, topOne,
18
18
  baseThree
19
19
  ];
20
20
  const baseRandom = Math.floor(Math.random() * baseTextures.length);
21
- console.log(baseTextures[baseRandom]);
21
+ // console.log(baseTextures[baseRandom]);
22
22
 
23
23
  const topTextures = [
24
- { topOne },
25
- { topTwo },
26
- { topThree }
24
+ topOne,
25
+ topTwo,
26
+ topThree
27
27
  ];
28
28
  const topRandom = Math.floor(Math.random() * topTextures.length);
29
29
  // { topTextures[topRandom] }
30
30
 
31
31
  return (
32
32
  <>
33
- {/* <GatsbyImage
33
+ <GatsbyImage
34
34
  image={baseTextures[baseRandom].image.localFile.childImageSharp.gatsbyImageData}
35
35
  alt="splash texture"
36
36
  className="texture-slice"
@@ -41,7 +41,7 @@ export const PaddleTextureBackgrounds = ({ baseOne, baseTwo, baseThree, topOne,
41
41
  alt="sand texture"
42
42
  className="texture-slice crop"
43
43
  objectFit="contain"
44
- /> */}
44
+ />
45
45
  <svg viewBox="0 0 1200 630" xmlns="http://www.w3.org/2000/svg">
46
46
  <title>Diagonal line decoration</title>
47
47
  <line