@rileybathurst/paddle 1.9.10 → 1.9.12

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.9.10",
4
+ "version": "1.9.12",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
package/src/index.tsx CHANGED
@@ -38,6 +38,7 @@ export * from "./types/paddle-location-types";
38
38
  export * from "./types/paddle-location-deck-types";
39
39
  export * from "./types/paddle-gatsby-image-type";
40
40
  export * from "./types/paddle-purchase-types";
41
+ export * from "./types/paddle-purchase-image-types";
41
42
  export * from "./types/paddle-brand-types";
42
43
  export * from "./types/paddle-book-now-types";
43
44
  export * from "./types/paddle-testimonial-types";
@@ -16,7 +16,7 @@ export const PaddleLocationDeck = ({
16
16
  key={location.id}
17
17
  season_start={season_start}
18
18
  season_end={season_end}
19
- phoneNumber={phone}
19
+ phone={phone}
20
20
  {...location}
21
21
  />
22
22
  ))}
@@ -5,6 +5,7 @@ import type { PaddleGatsbyImageType } from "./types/paddle-gatsby-image-type";
5
5
  import { PaddleInchesRemainder } from "./paddle-inches-remainder";
6
6
  import { PaddleTextureBackgrounds } from "./paddle-texture-backgrounds";
7
7
  import { PaddlePurchaseTypes } from "./types/paddle-purchase-types";
8
+ import { PaddlePurchaseAndImageTypes } from "./types/paddle-purchase-image-types";
8
9
 
9
10
  // TODO: I'm not sure if this is needed or I can loop it easier
10
11
  interface NameTypes {
@@ -46,16 +47,7 @@ const Badges = ({ inflatable, demo, discount }: BadgeTypes) => {
46
47
  return null;
47
48
  }
48
49
 
49
- interface PurchaseTypes extends PaddlePurchaseTypes {
50
- sportSlug: string;
51
- brandSlug: string;
52
- baseOne: { image: PaddleGatsbyImageType };
53
- baseTwo: { image: PaddleGatsbyImageType };
54
- baseThree: { image: PaddleGatsbyImageType };
55
- topOne: { image: PaddleGatsbyImageType };
56
- topTwo: { image: PaddleGatsbyImageType };
57
- topThree: { image: PaddleGatsbyImageType };
58
- };
50
+
59
51
  export const PaddlePurchase = ({
60
52
  id,
61
53
  title,
@@ -75,7 +67,7 @@ export const PaddlePurchase = ({
75
67
  baseThree,
76
68
  topOne,
77
69
  topTwo,
78
- topThree }: PurchaseTypes) => {
70
+ topThree }: PaddlePurchaseAndImageTypes) => {
79
71
 
80
72
  return (
81
73
  <article key={id} className="purchase">
@@ -3,12 +3,24 @@ import { GatsbyImage } from "gatsby-plugin-image";
3
3
  import type { PaddleGatsbyImageType } from "./types/paddle-gatsby-image-type";
4
4
 
5
5
  type textureTypes = {
6
- baseOne: { image: PaddleGatsbyImageType };
7
- baseTwo: { image: PaddleGatsbyImageType };
8
- baseThree: { image: PaddleGatsbyImageType };
9
- topOne: { image: PaddleGatsbyImageType };
10
- topTwo: { image: PaddleGatsbyImageType };
11
- topThree: { image: PaddleGatsbyImageType };
6
+ baseOne: {
7
+ image: PaddleGatsbyImageType;
8
+ };
9
+ baseTwo: {
10
+ image: PaddleGatsbyImageType;
11
+ };
12
+ baseThree: {
13
+ image: PaddleGatsbyImageType;
14
+ };
15
+ topOne: {
16
+ image: PaddleGatsbyImageType;
17
+ };
18
+ topTwo: {
19
+ image: PaddleGatsbyImageType;
20
+ };
21
+ topThree: {
22
+ image: PaddleGatsbyImageType;
23
+ };
12
24
  };
13
25
  export const PaddleTextureBackgrounds = ({ baseOne, baseTwo, baseThree, topOne, topTwo, topThree }: textureTypes) => {
14
26
  const baseTextures = [
@@ -25,9 +25,8 @@ export interface PaddleLocationTypes {
25
25
 
26
26
  season_start?: string;
27
27
  season_end?: string;
28
- phoneNumber?: string;
28
+ phone?: string;
29
29
 
30
30
  offSeasonDetails?: string;
31
- phone?: boolean;
32
31
  weatherPermitting?: boolean;
33
32
  }
@@ -0,0 +1,11 @@
1
+ import type { PaddleGatsbyImageType } from "./paddle-gatsby-image-type";
2
+ import type { PaddlePurchaseTypes } from "./paddle-purchase-types";
3
+
4
+ export type PaddlePurchaseAndImageTypes = PaddlePurchaseTypes & {
5
+ baseOne: { image: PaddleGatsbyImageType };
6
+ baseTwo: { image: PaddleGatsbyImageType };
7
+ baseThree: { image: PaddleGatsbyImageType };
8
+ topOne: { image: PaddleGatsbyImageType };
9
+ topTwo: { image: PaddleGatsbyImageType };
10
+ topThree: { image: PaddleGatsbyImageType };
11
+ };
@@ -1,6 +1,6 @@
1
1
  import type { PaddleGatsbyImageType } from "./paddle-gatsby-image-type";
2
2
 
3
- export type PaddlePurchaseTypes = {
3
+ type BasePaddlePurchaseTypes = {
4
4
  id: React.Key;
5
5
  title: string;
6
6
  slug: string;
@@ -12,10 +12,19 @@ export type PaddlePurchaseTypes = {
12
12
  demo: boolean;
13
13
  discount?: number;
14
14
  cutout: PaddleGatsbyImageType;
15
- sport: {
16
- slug: string;
17
- };
18
- brand: {
19
- slug: string;
20
- };
15
+
16
+ baseOne: { image: PaddleGatsbyImageType };
17
+ baseTwo: { image: PaddleGatsbyImageType };
18
+ baseThree: { image: PaddleGatsbyImageType };
19
+ topOne: { image: PaddleGatsbyImageType };
20
+ topTwo: { image: PaddleGatsbyImageType };
21
+ topThree: { image: PaddleGatsbyImageType };
21
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
+ );