@rileybathurst/paddle 0.0.112 → 0.0.114
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
|
@@ -12,8 +12,11 @@ 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) {
|
|
18
|
+
|
|
19
|
+
console.log(offSeasonDetails);
|
|
17
20
|
|
|
18
21
|
// TODO: these need a query but thats not the most important first step
|
|
19
22
|
if (name === "Free Parking Lot" || name === "Parking" || name === "Delivery") {
|
|
@@ -39,14 +42,49 @@ function Season({ name, season_start, season_end, opening_time, closing_time }:
|
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
|
|
45
|
+
if (season_start) {
|
|
46
|
+
const currentDay = new Date();
|
|
47
|
+
const seasonStartDate = new Date(season_start);
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<p>
|
|
51
|
+
We're closed for the season<br />
|
|
52
|
+
|
|
53
|
+
{currentDay < seasonStartDate ? (
|
|
54
|
+
<>
|
|
55
|
+
We will reopen<br />
|
|
56
|
+
{season_start}<br />
|
|
57
|
+
Weather Permitting
|
|
58
|
+
|
|
59
|
+
{offSeasonDetails ? (
|
|
60
|
+
<>
|
|
61
|
+
<br />
|
|
62
|
+
<p>offSeasonDetails</p>
|
|
63
|
+
</>
|
|
64
|
+
)
|
|
65
|
+
: null}
|
|
66
|
+
|
|
67
|
+
</>
|
|
68
|
+
) : null}
|
|
69
|
+
</p>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
42
73
|
return (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
|
|
74
|
+
<>
|
|
75
|
+
<p>
|
|
76
|
+
We're closed for the season
|
|
77
|
+
</p>
|
|
78
|
+
{offSeasonDetails ? (
|
|
79
|
+
<>
|
|
80
|
+
<br />
|
|
81
|
+
<p>offSeasonDetails</p>
|
|
82
|
+
</>
|
|
83
|
+
)
|
|
84
|
+
: null}
|
|
85
|
+
</>
|
|
49
86
|
)
|
|
87
|
+
|
|
50
88
|
}
|
|
51
89
|
|
|
52
90
|
interface ContentTypes {
|
|
@@ -74,8 +112,10 @@ interface ContentTypes {
|
|
|
74
112
|
season_start?: string;
|
|
75
113
|
season_end?: string;
|
|
76
114
|
|
|
115
|
+
offSeasonDetails?: string;
|
|
116
|
+
|
|
77
117
|
}
|
|
78
|
-
function Content({ svg, name, address, description, opening_time, closing_time, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end }: ContentTypes) {
|
|
118
|
+
function Content({ svg, name, address, description, opening_time, closing_time, streetAddress, addressLocality, addressRegion, postalCode, commonName, season_start, season_end, offSeasonDetails }: ContentTypes) {
|
|
79
119
|
return (
|
|
80
120
|
<>
|
|
81
121
|
<div
|
|
@@ -116,6 +156,7 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
116
156
|
opening_time={opening_time}
|
|
117
157
|
closing_time={closing_time}
|
|
118
158
|
name={name}
|
|
159
|
+
offSeasonDetails={offSeasonDetails}
|
|
119
160
|
/>
|
|
120
161
|
) : (
|
|
121
162
|
<Markdown className="react-markdown" >
|
|
@@ -127,7 +168,7 @@ function Content({ svg, name, address, description, opening_time, closing_time,
|
|
|
127
168
|
)
|
|
128
169
|
}
|
|
129
170
|
|
|
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) {
|
|
171
|
+
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
172
|
|
|
132
173
|
if (link.includes('http')) {
|
|
133
174
|
return (
|
|
@@ -155,6 +196,8 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
|
|
|
155
196
|
season_start={season_start}
|
|
156
197
|
season_end={season_end}
|
|
157
198
|
|
|
199
|
+
offSeasonDetails={offSeasonDetails}
|
|
200
|
+
|
|
158
201
|
/>
|
|
159
202
|
</a>
|
|
160
203
|
{name === "On Water Rental" && phone ? <Phone phone={phone} /> : null}
|
|
@@ -183,6 +226,9 @@ export function PaddleLocationCard({ svg, name, link, address, description, open
|
|
|
183
226
|
|
|
184
227
|
season_start={season_start}
|
|
185
228
|
season_end={season_end}
|
|
229
|
+
|
|
230
|
+
offSeasonDetails={offSeasonDetails}
|
|
231
|
+
|
|
186
232
|
/>
|
|
187
233
|
</Link>
|
|
188
234
|
{name === "On Water Rental" && phone ? <Phone phone={phone} /> : null}
|