@rileybathurst/paddle 1.9.31 → 1.9.32
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 +2 -1
- package/src/paddle-compare.tsx +37 -26
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rileybathurst/paddle",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.32",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "tsc --noEmit && stay-gold && vite",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
11
11
|
"preview": "vite preview",
|
|
12
12
|
"storybook": "tsc --noEmit && stay-gold && storybook dev -p 6006",
|
|
13
|
+
"storybook-dirty": "storybook dev -p 6006",
|
|
13
14
|
"build-storybook": "storybook build",
|
|
14
15
|
"release": "npm version patch && npm login && npm publish",
|
|
15
16
|
"stay-gold": "stay-gold"
|
package/src/paddle-compare.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import { PaddleTime } from './paddle-time';
|
|
5
|
+
// import { PaddleTime } from './paddle-time';
|
|
6
6
|
import { PaddleBookNow } from './paddle-book-now';
|
|
7
7
|
import type { PaddleCompareTypes } from './types/paddle-compare-types';
|
|
8
8
|
|
|
@@ -22,9 +22,26 @@ type CompareDetailsProps = {
|
|
|
22
22
|
peeks?: string;
|
|
23
23
|
peek_base: string;
|
|
24
24
|
strapiBranchName: string;
|
|
25
|
+
|
|
26
|
+
// ? this can maybe loop from itself?
|
|
27
|
+
tours: {
|
|
28
|
+
id: React.Key;
|
|
29
|
+
name: string;
|
|
30
|
+
slug: string;
|
|
31
|
+
sport: string;
|
|
32
|
+
duration?: string;
|
|
33
|
+
timeframe?: string;
|
|
34
|
+
start?: string;
|
|
35
|
+
finish?: string;
|
|
36
|
+
excerpt?: string;
|
|
37
|
+
minimum?: number;
|
|
38
|
+
price?: number;
|
|
39
|
+
peek?: string;
|
|
40
|
+
fitness?: string;
|
|
41
|
+
}[];
|
|
25
42
|
};
|
|
26
43
|
|
|
27
|
-
const CompareDetails = ({
|
|
44
|
+
const CompareDetails = ({
|
|
28
45
|
title,
|
|
29
46
|
link,
|
|
30
47
|
sport,
|
|
@@ -39,30 +56,33 @@ const CompareDetails = ({
|
|
|
39
56
|
price,
|
|
40
57
|
peeks,
|
|
41
58
|
peek_base,
|
|
42
|
-
strapiBranchName
|
|
59
|
+
strapiBranchName,
|
|
60
|
+
tours
|
|
61
|
+
}: CompareDetailsProps) => {
|
|
43
62
|
return (
|
|
44
63
|
<section>
|
|
45
|
-
|
|
64
|
+
<select
|
|
46
65
|
name="tour1"
|
|
47
66
|
id={title}
|
|
48
67
|
className="comparesheet_select"
|
|
49
68
|
aria-label="Select first tour or lesson"
|
|
50
69
|
>
|
|
51
|
-
{
|
|
70
|
+
{tours.map((tour) => (
|
|
52
71
|
<option
|
|
53
|
-
key={
|
|
54
|
-
value={
|
|
72
|
+
key={tour.id}
|
|
73
|
+
value={tour.name}
|
|
55
74
|
>
|
|
56
|
-
{
|
|
75
|
+
{tour.name}
|
|
57
76
|
</option>
|
|
58
77
|
))}
|
|
59
|
-
</select>
|
|
78
|
+
</select>
|
|
60
79
|
<h2 className="kilimanjaro">
|
|
61
80
|
<a href={link}>{title}</a>
|
|
62
81
|
</h2>
|
|
63
82
|
|
|
64
83
|
<h4 className="capitalize">{sport}</h4>
|
|
65
84
|
|
|
85
|
+
{/* // TODO: time is more complex so just get it running first */}
|
|
66
86
|
{/* <p>
|
|
67
87
|
<PaddleTime
|
|
68
88
|
start={start}
|
|
@@ -107,7 +127,7 @@ export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleComp
|
|
|
107
127
|
|
|
108
128
|
let id1 = tours[0].id;
|
|
109
129
|
let id2 = tours[1].id;
|
|
110
|
-
|
|
130
|
+
|
|
111
131
|
let tour1 = tours[0].name;
|
|
112
132
|
let tour2 = tours[1].name;
|
|
113
133
|
let link1 = tours[0].slug;
|
|
@@ -152,22 +172,6 @@ export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleComp
|
|
|
152
172
|
<p className='button-drop'>Book Now</p>
|
|
153
173
|
</div>
|
|
154
174
|
|
|
155
|
-
<select
|
|
156
|
-
name="tour1"
|
|
157
|
-
// id={id1}
|
|
158
|
-
className="comparesheet_select"
|
|
159
|
-
aria-label="Select first tour or lesson"
|
|
160
|
-
>
|
|
161
|
-
{tours.map((tour) => (
|
|
162
|
-
<option
|
|
163
|
-
key={tour.id}
|
|
164
|
-
value={tour.id}
|
|
165
|
-
>
|
|
166
|
-
{tour.name}
|
|
167
|
-
</option>
|
|
168
|
-
))}
|
|
169
|
-
</select>
|
|
170
|
-
|
|
171
175
|
<CompareDetails
|
|
172
176
|
key={id1}
|
|
173
177
|
title={tour1}
|
|
@@ -183,8 +187,11 @@ export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleComp
|
|
|
183
187
|
price={price1}
|
|
184
188
|
peeks={peeks1}
|
|
185
189
|
fitness={fitness1}
|
|
190
|
+
|
|
186
191
|
strapiBranchName={strapiBranchName}
|
|
187
192
|
peek_base={peek_base}
|
|
193
|
+
|
|
194
|
+
tours={tours}
|
|
188
195
|
/>
|
|
189
196
|
<CompareDetails
|
|
190
197
|
key={id2}
|
|
@@ -201,8 +208,12 @@ export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleComp
|
|
|
201
208
|
price={price2}
|
|
202
209
|
peeks={peeks2}
|
|
203
210
|
fitness={fitness2}
|
|
211
|
+
|
|
204
212
|
strapiBranchName={strapiBranchName}
|
|
205
213
|
peek_base={peek_base}
|
|
214
|
+
|
|
215
|
+
tours={tours}
|
|
216
|
+
|
|
206
217
|
/>
|
|
207
218
|
|
|
208
219
|
</div>
|