@rileybathurst/paddle 1.9.3 → 1.9.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.9.3",
4
+ "version": "1.9.4",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
@@ -35,14 +35,16 @@ const LineBreaker = ({ text }: { text: string; }) => {
35
35
  );
36
36
  }
37
37
 
38
- export const PaddlePricingChart = ({ rentalRates, branch }: paddlePricingChartTypes) => {
38
+ export const PaddlePricingChart = ({ rentalRates, branches }: paddlePricingChartTypes) => {
39
39
 
40
40
  console.log('paddle pricing chart testing');
41
41
  console.log('🦄');
42
42
  console.log(rentalRates);
43
- console.log(branch);
43
+ console.log(branches);
44
44
  console.log('🦖');
45
45
 
46
+ console.log(rentalRates.nodes.map(rate => rate.branches?.map(branch => branch.slug)));
47
+
46
48
  return (
47
49
  <div className="pricing-chart">
48
50
  <div className="column">
@@ -57,7 +59,7 @@ export const PaddlePricingChart = ({ rentalRates, branch }: paddlePricingChartTy
57
59
 
58
60
  {rentalRates.nodes.map((rate) => (
59
61
  <div key={rate.id} className="column">
60
- {rate.retail && rate.branch.slug == branch.slug ? (
62
+ {rate.retail && rate.branches?.some(branch => branch.slug === branches?.slug) ? (
61
63
  <Link to={`/retail/${rate.retail.sport.slug}/${rate.retail.brand.slug}/${rate.retail.slug}`}>
62
64
  <LineBreaker text={rate.item} />
63
65
  </Link>
@@ -10,9 +10,9 @@ export type paddlePricingChartTypes = {
10
10
  fullDay: number;
11
11
  pedalAdd?: number;
12
12
 
13
- branch: {
13
+ branches?: {
14
14
  slug: string;
15
- };
15
+ }[];
16
16
 
17
17
  retail?: {
18
18
  slug: string;
@@ -25,7 +25,7 @@ export type paddlePricingChartTypes = {
25
25
  };
26
26
  }[];
27
27
  };
28
- branch: {
28
+ branches?: {
29
29
  slug: string;
30
30
  }
31
31
  };