@rileybathurst/paddle 0.0.112 → 0.0.113

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.112",
4
+ "version": "0.0.113",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -12,8 +12,9 @@ interface SeasonTypes {
12
12
  opening_time: string;
13
13
  closing_time: string;
14
14
  name: string;
15
+ offSeasonDetails?: string;
15
16
  }
16
- function Season({ name, season_start, season_end, opening_time, closing_time }: SeasonTypes) {
17
+ function Season({ name, season_start, season_end, opening_time, closing_time, offSeasonDetails }: SeasonTypes) {
17
18
 
18
19
  // TODO: these need a query but thats not the most important first step
19
20
  if (name === "Free Parking Lot" || name === "Parking" || name === "Delivery") {
@@ -39,14 +40,49 @@ function Season({ name, season_start, season_end, opening_time, closing_time }:
39
40
  }
40
41
  }
41
42
 
43
+ if (season_start) {
44
+ const currentDay = new Date();
45
+ const seasonStartDate = new Date(season_start);
46
+
47
+ return (
48
+ <p>
49
+ We&apos;re closed for the season<br />
50
+
51
+ {currentDay < seasonStartDate ? (
52
+ <>
53
+ We will reopen<br />
54
+ {season_start}<br />
55
+ Weather Permitting
56
+
57
+ {offSeasonDetails ? (
58
+ <>
59
+ <br />
60
+ <p>offSeasonDetails</p>
61
+ </>
62
+ )
63
+ : null}
64
+
65
+ </>
66
+ ) : null}
67
+ </p>
68
+ )
69
+ }
70
+
42
71
  return (
43
- <p>
44
- We&apos;re closed for the season:<br />
45
- {/* We will reopen<br /> */}
46
- {/* {season_start} - {season_end}<br /> */}
47
- {/* Weather Permitting */}
48
- </p>
72
+ <>
73
+ <p>
74
+ We&apos;re closed for the season
75
+ </p>
76
+ {offSeasonDetails ? (
77
+ <>
78
+ <br />
79
+ <p>offSeasonDetails</p>
80
+ </>
81
+ )
82
+ : null}
83
+ </>
49
84
  )
85
+
50
86
  }
51
87
 
52
88
  interface ContentTypes {
@@ -74,8 +110,10 @@ interface ContentTypes {
74
110
  season_start?: string;
75
111
  season_end?: string;
76
112
 
113
+ offSeasonDetails?: string;
114
+
77
115
  }
78
- function Content({ svg, name, address, description, opening_time, closing_time, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }: ContentTypes) {
116
+ function Content({ svg, name, address, description, opening_time, closing_time, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end, offSeasonDetails }: ContentTypes) {
79
117
  return (
80
118
  <>
81
119
  <div
@@ -116,6 +154,7 @@ function Content({ svg, name, address, description, opening_time, closing_time,
116
154
  opening_time={opening_time}
117
155
  closing_time={closing_time}
118
156
  name={name}
157
+ offSeasonDetails={offSeasonDetails}
119
158
  />
120
159
  ) : (
121
160
  <Markdown className="react-markdown" >
@@ -127,7 +166,7 @@ function Content({ svg, name, address, description, opening_time, closing_time,
127
166
  )
128
167
  }
129
168
 
130
- export function PaddleLocationCard({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end, phone }: LocationCardTypes) {
169
+ export function PaddleLocationCard({ svg, name, link, address, description, opening_time, closing_time, background, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end, phone, offSeasonDetails }: LocationCardTypes) {
131
170
 
132
171
  if (link.includes('http')) {
133
172
  return (
@@ -155,6 +194,8 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
155
194
  season_start={season_start}
156
195
  season_end={season_end}
157
196
 
197
+ offSeasonDetails={offSeasonDetails}
198
+
158
199
  />
159
200
  </a>
160
201
  {name === "On Water Rental" && phone ? <Phone phone={phone} /> : null}
@@ -183,6 +224,9 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
183
224
 
184
225
  season_start={season_start}
185
226
  season_end={season_end}
227
+
228
+ offSeasonDetails={offSeasonDetails}
229
+
186
230
  />
187
231
  </Link>
188
232
  {name === "On Water Rental" && phone ? <Phone phone={phone} /> : null}
@@ -31,4 +31,6 @@ export interface LocationCardTypes {
31
31
  season_start?: string;
32
32
  season_end?: string;
33
33
  phone?: string;
34
+
35
+ offSeasonDetails?: string;
34
36
  }