@rileybathurst/paddle 1.2.2 → 1.2.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "1.2.2",
4
+ "version": "1.2.4",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -3,13 +3,16 @@ import * as React from "react"
3
3
  interface BookNowTypes {
4
4
  peek_base: string
5
5
  strapiLocaleName: string
6
+ specificName?: string
7
+ specificLink?: string
6
8
  }
7
- export const PaddleBookNow = ({ peek_base, strapiLocaleName }: BookNowTypes) =>
9
+ export const PaddleBookNow = ({ peek_base, strapiLocaleName, specificName, specificLink }: BookNowTypes) =>
8
10
  <a
9
- href={peek_base}
11
+ href={specificLink || peek_base}
10
12
  rel="noopener noreferrer"
11
13
  className="book-now"
12
- title={`Book now with ${strapiLocaleName} kayak and paddleboard`}
14
+ title={`Book now ${specificLink && <> {specificLink} </>} with ${strapiLocaleName} kayak and paddleboard`}
13
15
  >
16
+ {specificName && (<>{specificName} <br /></>)}
14
17
  BOOK NOW
15
18
  </a>
@@ -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}
@@ -3,11 +3,6 @@ export interface PaddleLocationCardTypes {
3
3
  svg: string;
4
4
  name: string;
5
5
  link: string;
6
- address: {
7
- data: {
8
- address: string;
9
- };
10
- };
11
6
  description: {
12
7
  data: {
13
8
  description: string;