@rileybathurst/paddle 1.3.3 → 1.3.5
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 +1 -1
- package/src/paddle-pricing-chart.tsx +1 -4
- package/src/paddle-time.tsx +2 -18
package/package.json
CHANGED
|
@@ -10,9 +10,7 @@ const LineBreaker = ({ text }: { text: string; }) => {
|
|
|
10
10
|
// console.log(newStr);
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
|
-
<h4
|
|
14
|
-
<SVG src={newStr} />
|
|
15
|
-
</h4>
|
|
13
|
+
<h4 dangerouslySetInnerHTML={{ __html: newStr }} />
|
|
16
14
|
);
|
|
17
15
|
}
|
|
18
16
|
|
|
@@ -30,7 +28,6 @@ export const PaddlePricingChart = ({ rentalRates, rentalAddons, book, peek_base,
|
|
|
30
28
|
|
|
31
29
|
{rentalRates.nodes.map((rate) => (
|
|
32
30
|
<div key={rate.id} className="row">
|
|
33
|
-
{/* <h4>{rate.item}</h4> */}
|
|
34
31
|
<LineBreaker text={rate.item} />
|
|
35
32
|
<p>{rate.oneHour}</p>
|
|
36
33
|
<p>{rate.threeHour}</p>
|
package/src/paddle-time.tsx
CHANGED
|
@@ -7,7 +7,7 @@ interface TimeTypes {
|
|
|
7
7
|
timeframe?: string;
|
|
8
8
|
slug?: string;
|
|
9
9
|
|
|
10
|
-
allStrapiSunsetTourTime
|
|
10
|
+
allStrapiSunsetTourTime?: {
|
|
11
11
|
nodes: {
|
|
12
12
|
startDate: string;
|
|
13
13
|
endDate: string;
|
|
@@ -16,35 +16,19 @@ interface TimeTypes {
|
|
|
16
16
|
}[];
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
allStrapiMoonlightTourDateTime: {
|
|
20
|
-
nodes: {
|
|
21
|
-
id: React.Key;
|
|
22
|
-
date: string;
|
|
23
|
-
start: string;
|
|
24
|
-
finish: string;
|
|
25
|
-
}[];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
19
|
}
|
|
29
20
|
export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapiSunsetTourTime }: TimeTypes) => {
|
|
30
21
|
|
|
31
|
-
console.log('🦄');
|
|
32
|
-
console.log(start);
|
|
33
|
-
console.log(finish);
|
|
34
|
-
console.log(duration);
|
|
35
|
-
console.log('🦊');
|
|
36
|
-
|
|
37
22
|
// TODO: sunset is a whole thing
|
|
38
23
|
const currentDate = new Date();
|
|
39
24
|
let sunsetStartTime = '';
|
|
40
25
|
let sunsetEndTime = '';
|
|
41
26
|
|
|
42
|
-
if (slug === 'sunset') {
|
|
27
|
+
if (slug === 'sunset' && allStrapiSunsetTourTime && allStrapiSunsetTourTime.nodes) {
|
|
43
28
|
allStrapiSunsetTourTime.nodes.map((time) => {
|
|
44
29
|
const startDate = new Date(time.startDate);
|
|
45
30
|
const endDate = new Date(time.endDate);
|
|
46
31
|
|
|
47
|
-
|
|
48
32
|
if (startDate <= currentDate && currentDate <= endDate) {
|
|
49
33
|
sunsetStartTime = time.startTime;
|
|
50
34
|
sunsetEndTime = time.endTime;
|