@rileybathurst/paddle 1.9.2 → 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 +5 -3
- package/src/paddle-compare.tsx +76 -78
- package/src/paddle-pricing-chart.tsx +11 -2
- package/src/paddle-testimonial.tsx +2 -2
- package/src/paddle-testimonials.tsx +2 -2
- package/src/paddle-ticket.tsx +1 -1
- package/src/paddle-top-bar.tsx +0 -2
- package/src/styles/variables.css +0 -2
- package/src/types/paddle-pricing-chart-types.ts +7 -0
- package/src/types/paddle-ticket-types.ts +1 -0
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rileybathurst/paddle",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
7
|
+
"dev": "tsc --noEmit && stay-gold && vite",
|
|
8
|
+
"dirty": "vite",
|
|
8
9
|
"build": "tsc && vite build",
|
|
9
10
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
10
11
|
"preview": "vite preview",
|
|
@@ -21,7 +22,8 @@
|
|
|
21
22
|
"react-aria-components": "^1.10.0",
|
|
22
23
|
"react-dom": "^18.3.1",
|
|
23
24
|
"react-inlinesvg": "^4.2.0",
|
|
24
|
-
"react-markdown": "^10.1.0"
|
|
25
|
+
"react-markdown": "^10.1.0",
|
|
26
|
+
"stay-gold": "^1.1.8"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"@biomejs/biome": "2.0.2",
|
package/src/paddle-compare.tsx
CHANGED
|
@@ -1,84 +1,50 @@
|
|
|
1
|
-
//
|
|
1
|
+
// TODO: this is not ready dont use it
|
|
2
|
+
// Vite runs so I feel like I can pull this into it for testing itll be abit of a thing that might not be used but I think easier than storybook
|
|
2
3
|
|
|
3
|
-
import React
|
|
4
|
+
import React from 'react';
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
-
import BookNow from '../../components/peek/book-now';
|
|
7
|
-
import { PaddleTime } from './paddle-time';
|
|
6
|
+
// import { PaddleTime } from './paddle-time';
|
|
8
7
|
import { PaddleBookNow } from './paddle-book-now';
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const first = (e) => {
|
|
29
|
-
setTour1(e.target.value);
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const second = (e) => {
|
|
34
|
-
setTour2(e.target.value);
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const Details1 = (props) => {
|
|
39
|
-
props.set.forEach(element => {
|
|
40
|
-
if (element.name === props.show) {
|
|
41
|
-
setLink1(element.slug);
|
|
42
|
-
setSport1(element.sport);
|
|
43
|
-
setDuration1(element.duration);
|
|
44
|
-
setStart1(element.start);
|
|
45
|
-
setFinish1(element.finish);
|
|
46
|
-
setFitness1(element.fitness);
|
|
47
|
-
setLocation1(element.location);
|
|
48
|
-
setExcerpt1(element.excerpt);
|
|
49
|
-
setMinimum1(element.minimum);
|
|
50
|
-
setPrice1(element.price);
|
|
51
|
-
setPeeks1(element.peek);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const Details2 = (props) => {
|
|
58
|
-
props.set.forEach(element => {
|
|
59
|
-
if (element.name === props.show) {
|
|
60
|
-
setLink2(element.slug);
|
|
61
|
-
setSport2(element.sport);
|
|
62
|
-
setDuration2(element.duration);
|
|
63
|
-
setStart2(element.start);
|
|
64
|
-
setFinish2(element.finish);
|
|
65
|
-
setFitness2(element.fitness);
|
|
66
|
-
setLocation2(element.location);
|
|
67
|
-
setExcerpt2(element.excerpt);
|
|
68
|
-
setMinimum2(element.minimum);
|
|
69
|
-
setPrice2(element.price);
|
|
70
|
-
setPeeks2(element.peek);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
return null;
|
|
74
|
-
}
|
|
9
|
+
type CompareDetailsProps = {
|
|
10
|
+
title: string;
|
|
11
|
+
link: string;
|
|
12
|
+
sport: string;
|
|
13
|
+
duration?: string;
|
|
14
|
+
timeframe?: string;
|
|
15
|
+
start?: string;
|
|
16
|
+
finish?: string;
|
|
17
|
+
fitness?: string;
|
|
18
|
+
location: string;
|
|
19
|
+
excerpt: string;
|
|
20
|
+
minimum: number;
|
|
21
|
+
price: number;
|
|
22
|
+
peeks?: string;
|
|
23
|
+
peek_base: string;
|
|
24
|
+
strapiBranchName: string;
|
|
25
|
+
};
|
|
75
26
|
|
|
76
|
-
const CompareDetails = ({
|
|
27
|
+
const CompareDetails = ({
|
|
28
|
+
title,
|
|
29
|
+
link,
|
|
30
|
+
sport,
|
|
31
|
+
// duration,
|
|
32
|
+
// timeframe,
|
|
33
|
+
// start,
|
|
34
|
+
// finish,
|
|
35
|
+
fitness,
|
|
36
|
+
location,
|
|
37
|
+
excerpt,
|
|
38
|
+
minimum,
|
|
39
|
+
price,
|
|
40
|
+
peeks,
|
|
41
|
+
peek_base,
|
|
42
|
+
strapiBranchName }: CompareDetailsProps) => {
|
|
77
43
|
return (
|
|
78
44
|
<section>
|
|
79
45
|
{/* <select
|
|
80
46
|
name="tour1"
|
|
81
|
-
id={
|
|
47
|
+
id={title}
|
|
82
48
|
className="comparesheet_select"
|
|
83
49
|
aria-label="Select first tour or lesson"
|
|
84
50
|
>
|
|
@@ -97,14 +63,14 @@ const CompareDetails = ({ key, title, link, sport, duration, start, finish, fitn
|
|
|
97
63
|
|
|
98
64
|
<h4 className="capitalize">{sport}</h4>
|
|
99
65
|
|
|
100
|
-
<p>
|
|
66
|
+
{/* <p>
|
|
101
67
|
<PaddleTime
|
|
102
68
|
start={start}
|
|
103
69
|
finish={finish}
|
|
104
70
|
duration={duration}
|
|
105
71
|
timeframe={timeframe}
|
|
106
72
|
/>
|
|
107
|
-
</p>
|
|
73
|
+
</p> */}
|
|
108
74
|
|
|
109
75
|
<p className="capitalize">
|
|
110
76
|
{fitness} <span className="show-below__vulture"> fitness</span>
|
|
@@ -123,9 +89,9 @@ const CompareDetails = ({ key, title, link, sport, duration, start, finish, fitn
|
|
|
123
89
|
</p>
|
|
124
90
|
|
|
125
91
|
<PaddleBookNow
|
|
126
|
-
peek_base={
|
|
92
|
+
peek_base={peek_base}
|
|
127
93
|
strapiBranchName={strapiBranchName}
|
|
128
|
-
specificLink={
|
|
94
|
+
specificLink={peeks}
|
|
129
95
|
/>
|
|
130
96
|
</section >
|
|
131
97
|
)
|
|
@@ -153,7 +119,7 @@ type PaddleCompareTypes = {
|
|
|
153
119
|
};
|
|
154
120
|
export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleCompareTypes) => {
|
|
155
121
|
|
|
156
|
-
const [id1, setID1] = useState(tours[0].id);
|
|
122
|
+
/* const [id1, setID1] = useState(tours[0].id);
|
|
157
123
|
const [id2, setID2] = useState(tours[1].id);
|
|
158
124
|
|
|
159
125
|
const [tour1, setTour1] = useState(tours[0].name);
|
|
@@ -168,6 +134,9 @@ export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleComp
|
|
|
168
134
|
const [duration1, setDuration1] = useState(tours[0].duration || 'not set');
|
|
169
135
|
const [duration2, setDuration2] = useState(tours[1].duration || 'not set');
|
|
170
136
|
|
|
137
|
+
const [timeframe1, setTimeframe1] = useState(tours[0].timeframe || 'not set');
|
|
138
|
+
const [timeframe2, setTimeframe2] = useState(tours[1].timeframe || 'not set');
|
|
139
|
+
|
|
171
140
|
const [start1, setStart1] = useState(tours[0].start || 'not set');
|
|
172
141
|
const [start2, setStart2] = useState(tours[1].start || 'not set');
|
|
173
142
|
|
|
@@ -187,7 +156,36 @@ export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleComp
|
|
|
187
156
|
const [peeks2, setPeeks2] = useState(tours[1].peek || 'not set');
|
|
188
157
|
|
|
189
158
|
const [fitness1, setFitness1] = useState(tours[0].fitness || 'fitness');
|
|
190
|
-
const [fitness2, setFitness2] = useState(tours[1].fitness || 'fitness');
|
|
159
|
+
const [fitness2, setFitness2] = useState(tours[1].fitness || 'fitness'); */
|
|
160
|
+
|
|
161
|
+
// I dont know if this works as a state but I need to slowly build it all back out as its a mess
|
|
162
|
+
let id1 = tours[0].id;
|
|
163
|
+
let id2 = tours[1].id;
|
|
164
|
+
|
|
165
|
+
let tour1 = tours[0].name;
|
|
166
|
+
let tour2 = tours[1].name;
|
|
167
|
+
let link1 = tours[0].slug;
|
|
168
|
+
let link2 = tours[1].slug;
|
|
169
|
+
let sport1 = tours[0].sport;
|
|
170
|
+
let sport2 = tours[1].sport;
|
|
171
|
+
let duration1 = tours[0].duration || 'not set';
|
|
172
|
+
let duration2 = tours[1].duration || 'not set';
|
|
173
|
+
let timeframe1 = tours[0].timeframe || 'not set';
|
|
174
|
+
let timeframe2 = tours[1].timeframe || 'not set';
|
|
175
|
+
let start1 = tours[0].start || 'not set';
|
|
176
|
+
let start2 = tours[1].start || 'not set';
|
|
177
|
+
let finish1 = tours[0].finish || 'not set';
|
|
178
|
+
let finish2 = tours[1].finish || 'not set';
|
|
179
|
+
let excerpt1 = tours[0].excerpt || 'not set';
|
|
180
|
+
let excerpt2 = tours[1].excerpt || 'not set';
|
|
181
|
+
let minimum1 = tours[0].minimum || 0;
|
|
182
|
+
let minimum2 = tours[1].minimum || 0;
|
|
183
|
+
let price1 = tours[0].price || 0;
|
|
184
|
+
let price2 = tours[1].price || 0;
|
|
185
|
+
let peeks1 = tours[0].peek || 'not set';
|
|
186
|
+
let peeks2 = tours[1].peek || 'not set';
|
|
187
|
+
let fitness1 = tours[0].fitness || 'fitness';
|
|
188
|
+
let fitness2 = tours[1].fitness || 'fitness';
|
|
191
189
|
|
|
192
190
|
return (
|
|
193
191
|
<>
|
|
@@ -35,7 +35,16 @@ const LineBreaker = ({ text }: { text: string; }) => {
|
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export const PaddlePricingChart = ({ rentalRates }: paddlePricingChartTypes) => {
|
|
38
|
+
export const PaddlePricingChart = ({ rentalRates, branches }: paddlePricingChartTypes) => {
|
|
39
|
+
|
|
40
|
+
console.log('paddle pricing chart testing');
|
|
41
|
+
console.log('🦄');
|
|
42
|
+
console.log(rentalRates);
|
|
43
|
+
console.log(branches);
|
|
44
|
+
console.log('🦖');
|
|
45
|
+
|
|
46
|
+
console.log(rentalRates.nodes.map(rate => rate.branches?.map(branch => branch.slug)));
|
|
47
|
+
|
|
39
48
|
return (
|
|
40
49
|
<div className="pricing-chart">
|
|
41
50
|
<div className="column">
|
|
@@ -50,7 +59,7 @@ export const PaddlePricingChart = ({ rentalRates }: paddlePricingChartTypes) =>
|
|
|
50
59
|
|
|
51
60
|
{rentalRates.nodes.map((rate) => (
|
|
52
61
|
<div key={rate.id} className="column">
|
|
53
|
-
{rate.retail ? (
|
|
62
|
+
{rate.retail && rate.branches?.some(branch => branch.slug === branches?.slug) ? (
|
|
54
63
|
<Link to={`/retail/${rate.retail.sport.slug}/${rate.retail.brand.slug}/${rate.retail.slug}`}>
|
|
55
64
|
<LineBreaker text={rate.item} />
|
|
56
65
|
</Link>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { PaddleTestimonialTypes } from "./types/paddle-testimonial-types";
|
|
3
3
|
|
|
4
4
|
export const PaddleTestimonial = ({
|
|
5
5
|
id,
|
|
@@ -7,7 +7,7 @@ export const PaddleTestimonial = ({
|
|
|
7
7
|
customer,
|
|
8
8
|
sign,
|
|
9
9
|
location,
|
|
10
|
-
}:
|
|
10
|
+
}: PaddleTestimonialTypes) => {
|
|
11
11
|
return (
|
|
12
12
|
<li key={id}>
|
|
13
13
|
<p className="elbrus">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { PaddleTestimonial } from "./paddle-testimonial";
|
|
3
|
-
import {
|
|
3
|
+
import type { PaddleTestimonialTypes } from "./types/paddle-testimonial-types";
|
|
4
4
|
|
|
5
5
|
interface TestimonialsTypes {
|
|
6
|
-
nodes:
|
|
6
|
+
nodes: PaddleTestimonialTypes[];
|
|
7
7
|
}
|
|
8
8
|
export const PaddleTestimonials = ({ nodes }: TestimonialsTypes) => {
|
|
9
9
|
return (
|
package/src/paddle-ticket.tsx
CHANGED
|
@@ -28,7 +28,7 @@ export const PaddleTicket = ({
|
|
|
28
28
|
duration: duration,
|
|
29
29
|
timeframe: timeframe,
|
|
30
30
|
allStrapiSunsetTourTime: allStrapiSunsetTourTime,
|
|
31
|
-
allStrapiMoonlightTourDateTime: { nodes: [] }, // Provide an empty nodes array or the correct data as needed
|
|
31
|
+
// TODO: but I dont think these are needed here? allStrapiMoonlightTourDateTime: { nodes: [] }, // Provide an empty nodes array or the correct data as needed
|
|
32
32
|
slug: slug,
|
|
33
33
|
});
|
|
34
34
|
|
package/src/paddle-top-bar.tsx
CHANGED
|
@@ -2,8 +2,6 @@ import * as React from "react";
|
|
|
2
2
|
import Markdown from "react-markdown";
|
|
3
3
|
|
|
4
4
|
// TODO this would be nice to be able to close but I dont have it right yet
|
|
5
|
-
// ! needs ranaming now I've removed the ...data or if it cant write why
|
|
6
|
-
// TODO: move this to be exported from paddle to each branch site
|
|
7
5
|
type PaddleTopBarTypes = {
|
|
8
6
|
strapiBranch: {
|
|
9
7
|
topbar: {
|
package/src/styles/variables.css
CHANGED
|
@@ -10,6 +10,10 @@ export type paddlePricingChartTypes = {
|
|
|
10
10
|
fullDay: number;
|
|
11
11
|
pedalAdd?: number;
|
|
12
12
|
|
|
13
|
+
branches?: {
|
|
14
|
+
slug: string;
|
|
15
|
+
}[];
|
|
16
|
+
|
|
13
17
|
retail?: {
|
|
14
18
|
slug: string;
|
|
15
19
|
sport: {
|
|
@@ -21,4 +25,7 @@ export type paddlePricingChartTypes = {
|
|
|
21
25
|
};
|
|
22
26
|
}[];
|
|
23
27
|
};
|
|
28
|
+
branches?: {
|
|
29
|
+
slug: string;
|
|
30
|
+
}
|
|
24
31
|
};
|