@rileybathurst/paddle 1.9.36 → 1.9.38
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-compare.tsx +6 -0
- package/src/paddle-time.tsx +17 -0
package/package.json
CHANGED
package/src/paddle-compare.tsx
CHANGED
|
@@ -48,9 +48,13 @@ const CompareDetails = ({
|
|
|
48
48
|
}: CompareDetailsTypes) => {
|
|
49
49
|
|
|
50
50
|
// TODO: testing
|
|
51
|
+
console.log("start");
|
|
51
52
|
console.log(start);
|
|
53
|
+
console.log("finish");
|
|
52
54
|
console.log(finish);
|
|
55
|
+
console.log("duration");
|
|
53
56
|
console.log(duration);
|
|
57
|
+
console.log("timeframe");
|
|
54
58
|
console.log(timeframe);
|
|
55
59
|
|
|
56
60
|
const time = PaddleTime({
|
|
@@ -123,6 +127,8 @@ const CompareDetails = ({
|
|
|
123
127
|
|
|
124
128
|
export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleCompareTypes) => {
|
|
125
129
|
|
|
130
|
+
console.log(tours);
|
|
131
|
+
|
|
126
132
|
let id1 = tours[0].id;
|
|
127
133
|
let id2 = tours[1].id;
|
|
128
134
|
|
package/src/paddle-time.tsx
CHANGED
|
@@ -19,12 +19,22 @@ interface TimeTypes {
|
|
|
19
19
|
}
|
|
20
20
|
export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapiSunsetTourTime }: TimeTypes) => {
|
|
21
21
|
|
|
22
|
+
// TODO: testing
|
|
23
|
+
console.log("paddle time");
|
|
24
|
+
console.log(start);
|
|
25
|
+
console.log(finish);
|
|
26
|
+
console.log(duration);
|
|
27
|
+
console.log(timeframe);
|
|
28
|
+
|
|
22
29
|
// TODO: sunset is a whole thing
|
|
23
30
|
const currentDate = new Date();
|
|
24
31
|
let sunsetStartTime = '';
|
|
25
32
|
let sunsetEndTime = '';
|
|
26
33
|
|
|
27
34
|
if (slug === 'sunset' && allStrapiSunsetTourTime && allStrapiSunsetTourTime.nodes) {
|
|
35
|
+
// TODO: testing
|
|
36
|
+
console.log("sunset");
|
|
37
|
+
|
|
28
38
|
allStrapiSunsetTourTime.nodes.map((time) => {
|
|
29
39
|
const startDate = new Date(time.startDate);
|
|
30
40
|
const endDate = new Date(time.endDate);
|
|
@@ -39,6 +49,9 @@ export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapi
|
|
|
39
49
|
const hairSpace = String.fromCharCode(0x200A);
|
|
40
50
|
|
|
41
51
|
if (timeframe) {
|
|
52
|
+
// TODO: testing
|
|
53
|
+
console.log("timeframe");
|
|
54
|
+
|
|
42
55
|
return {
|
|
43
56
|
// key: timeframe, cant return key its a react special prop
|
|
44
57
|
// https://react.dev/warnings/special-props
|
|
@@ -48,6 +61,10 @@ export const PaddleTime = ({ start, finish, duration, timeframe, slug, allStrapi
|
|
|
48
61
|
}
|
|
49
62
|
|
|
50
63
|
if (duration) {
|
|
64
|
+
|
|
65
|
+
// TODO: testing
|
|
66
|
+
console.log("duration");
|
|
67
|
+
|
|
51
68
|
if (duration > 90) {
|
|
52
69
|
const hours = Math.floor(duration / 60);
|
|
53
70
|
const mins = duration % 60;
|