@rileybathurst/paddle 1.9.17 → 1.9.19
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
package/src/paddle-location.tsx
CHANGED
|
@@ -181,12 +181,7 @@ export const PaddleLocation = ({
|
|
|
181
181
|
season_start,
|
|
182
182
|
season_end
|
|
183
183
|
}: PaddleLocationTypes) => {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
// TODO: testing
|
|
187
|
-
console.log("PaddleLocation phone", phone);
|
|
188
|
-
console.log(typeof phone);
|
|
189
|
-
|
|
184
|
+
|
|
190
185
|
const content = (
|
|
191
186
|
<Content
|
|
192
187
|
svg={svg}
|
package/src/paddle-purchase.tsx
CHANGED
|
@@ -5,11 +5,7 @@ import { PaddleInchesRemainder } from "./paddle-inches-remainder";
|
|
|
5
5
|
import { PaddleTextureBackgrounds } from "./paddle-texture-backgrounds";
|
|
6
6
|
import { PaddlePurchaseAndImageTypes } from "./types/paddle-purchase-image-types";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
interface NameTypes {
|
|
10
|
-
name: string;
|
|
11
|
-
}
|
|
12
|
-
function Name({ name }: NameTypes) {
|
|
8
|
+
function Name({ name }: { name: string }) {
|
|
13
9
|
return (
|
|
14
10
|
<div className="badge">
|
|
15
11
|
<h5 className="capitalize">{name}</h5>
|
|
@@ -58,8 +54,8 @@ export const PaddlePurchase = ({
|
|
|
58
54
|
demo,
|
|
59
55
|
discount,
|
|
60
56
|
cutout,
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
sport,
|
|
58
|
+
brand,
|
|
63
59
|
baseOne,
|
|
64
60
|
baseTwo,
|
|
65
61
|
baseThree,
|
|
@@ -80,13 +76,13 @@ export const PaddlePurchase = ({
|
|
|
80
76
|
topThree={topThree}
|
|
81
77
|
/>
|
|
82
78
|
<Link
|
|
83
|
-
to={`/retail/${
|
|
79
|
+
to={`/retail/${sport.slug}/${brand.slug}/${slug}`}
|
|
84
80
|
className="image-link"
|
|
85
81
|
>
|
|
86
82
|
{cutout && (
|
|
87
83
|
<GatsbyImage
|
|
88
84
|
image={cutout.localFile?.childImageSharp?.gatsbyImageData}
|
|
89
|
-
alt={cutout.alternativeText || `${title} by ${
|
|
85
|
+
alt={cutout.alternativeText || `${title} by ${brand.name}`}
|
|
90
86
|
className="cutout"
|
|
91
87
|
objectFit="contain"
|
|
92
88
|
/>
|
|
@@ -99,7 +95,7 @@ export const PaddlePurchase = ({
|
|
|
99
95
|
/>
|
|
100
96
|
</div>
|
|
101
97
|
<h4 className="purchase__title">
|
|
102
|
-
<Link to={`/retail/${
|
|
98
|
+
<Link to={`/retail/${sport.slug}/${brand.slug}/${slug}`}>{title}</Link>
|
|
103
99
|
</h4>
|
|
104
100
|
<hr />
|
|
105
101
|
<p>{excerpt}</p>
|
package/src/phone.tsx
CHANGED
|
@@ -6,14 +6,9 @@ interface FormatPhoneNumberTypes {
|
|
|
6
6
|
const FormatPhoneNumber = ({ phone }: FormatPhoneNumberTypes) => {
|
|
7
7
|
const phoneNumber = String(phone);
|
|
8
8
|
|
|
9
|
-
// TODO: testing
|
|
10
|
-
console.log("FormatPhoneNumber phone", phone);
|
|
11
9
|
const cleaned = `${phoneNumber}`.replace(/\D/g, "");
|
|
12
10
|
const match = cleaned.match(/^(\d{3})(\d{3})(\d{4})$/);
|
|
13
11
|
if (match) {
|
|
14
|
-
|
|
15
|
-
// TODO: testing
|
|
16
|
-
console.log("match", match);
|
|
17
12
|
return `(${match[1]}) ${match[2]}-${match[3]}`;
|
|
18
13
|
}
|
|
19
14
|
return null;
|
|
@@ -25,9 +20,6 @@ type PhoneTypes = {
|
|
|
25
20
|
|
|
26
21
|
const Phone = ({ phone }: PhoneTypes) => {
|
|
27
22
|
|
|
28
|
-
// TODO: testing
|
|
29
|
-
console.log("phone", phone);
|
|
30
|
-
|
|
31
23
|
return (
|
|
32
24
|
<a href={`tel:${phone}`}
|
|
33
25
|
rel="noopener noreferrer"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PaddleGatsbyImageType } from "./paddle-gatsby-image-type";
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
export type PaddlePurchaseTypes = {
|
|
4
4
|
id: React.Key;
|
|
5
5
|
title: string;
|
|
6
6
|
slug: string;
|
|
@@ -13,18 +13,21 @@ type BasePaddlePurchaseTypes = {
|
|
|
13
13
|
discount?: number;
|
|
14
14
|
cutout: PaddleGatsbyImageType;
|
|
15
15
|
|
|
16
|
+
sport: {
|
|
17
|
+
id: React.Key;
|
|
18
|
+
slug: string
|
|
19
|
+
title: string;
|
|
20
|
+
};
|
|
21
|
+
brand: {
|
|
22
|
+
id: React.Key;
|
|
23
|
+
slug: string
|
|
24
|
+
name: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
16
27
|
baseOne: { image: PaddleGatsbyImageType };
|
|
17
28
|
baseTwo: { image: PaddleGatsbyImageType };
|
|
18
29
|
baseThree: { image: PaddleGatsbyImageType };
|
|
19
30
|
topOne: { image: PaddleGatsbyImageType };
|
|
20
31
|
topTwo: { image: PaddleGatsbyImageType };
|
|
21
32
|
topThree: { image: PaddleGatsbyImageType };
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type PaddlePurchaseTypes = BasePaddlePurchaseTypes & (
|
|
25
|
-
| { sport: { slug: string }; sportSlug?: string }
|
|
26
|
-
| { sportSlug: string; sport?: { slug: string } }
|
|
27
|
-
) & (
|
|
28
|
-
| { brand: { slug: string }; brandSlug?: string }
|
|
29
|
-
| { brandSlug: string; brand?: { slug: string } }
|
|
30
|
-
);
|
|
33
|
+
};
|