@rileybathurst/paddle 0.0.98 → 0.0.100

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": "0.0.98",
4
+ "version": "0.0.100",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -7,8 +7,9 @@ import type { LocationCardTypes } from "./types/location-card-types";
7
7
  import HourMin from "./hour-min";
8
8
 
9
9
  interface SeasonTypes {
10
- season_start: string;
11
- season_end: string;
10
+ season_start?: string;
11
+ season_end?: string;
12
+
12
13
  opening_time: string;
13
14
  closing_time: string;
14
15
  name: string;
@@ -20,22 +21,25 @@ function Season({ name, season_start, season_end, opening_time, closing_time }:
20
21
  return null;
21
22
  }
22
23
 
23
- const currentDay = new Date();
24
- console.log(`currentDay ${currentDay}`);
25
- const seasonStartDate = new Date(season_start);
26
- console.log(`season_start ${season_start}`);
27
- const seasonEndDate = new Date(season_end);
28
- console.log(`season_end ${season_end}`);
29
-
30
- if (currentDay > seasonStartDate || currentDay < seasonEndDate) {
31
- return (
32
- <p>
33
- {opening_time ? "Open Daily: " : null}
34
- <HourMin time={opening_time} />
35
- {opening_time ? " - : " : null}
36
- <HourMin time={closing_time} />
37
- </p>
38
- )
24
+ if (season_start && season_end) {
25
+ const currentDay = new Date();
26
+ console.log(`currentDay ${currentDay}`);
27
+ const seasonStartDate = new Date(season_start);
28
+ console.log(`season_start ${season_start}`);
29
+ const seasonEndDate = new Date(season_end);
30
+ console.log(`season_end ${season_end}`);
31
+
32
+
33
+ if (currentDay > seasonStartDate || currentDay < seasonEndDate) {
34
+ return (
35
+ <p>
36
+ {opening_time ? "Open Daily: " : null}
37
+ <HourMin time={opening_time} />
38
+ {opening_time ? " - : " : null}
39
+ <HourMin time={closing_time} />
40
+ </p>
41
+ )
42
+ }
39
43
  }
40
44
 
41
45
  return (
@@ -64,16 +68,15 @@ interface ContentTypes {
64
68
  opening_time: string;
65
69
  closing_time: string;
66
70
 
67
-
68
- season_start: string;
69
- season_end: string;
70
-
71
71
  streetAddress?: string;
72
72
  addressLocality?: string;
73
73
  addressRegion?: string;
74
74
  postalCode?: string;
75
75
  commonName?: string;
76
76
 
77
+ season_start?: string;
78
+ season_end?: string;
79
+
77
80
  }
78
81
  function Content({ svg, name, address, description, opening_time, closing_time, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }: ContentTypes) {
79
82
  return (
@@ -123,6 +126,14 @@ function Content({ svg, name, address, description, opening_time, closing_time,
123
126
  }
124
127
 
125
128
  export function PaddleLocationCard({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }: LocationCardTypes) {
129
+
130
+ Object.entries({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }).map(([key, value]) => {
131
+ console.log(key, value);
132
+ }
133
+ );
134
+
135
+ console.log(`PaddleLocationCard season_start ${season_start}`);
136
+
126
137
  if (link.includes('http')) {
127
138
  return (
128
139
  <a href={link}