@rileybathurst/paddle 1.3.3 → 1.3.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.3.3",
4
+ "version": "1.3.4",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -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;