@rileybathurst/paddle 1.9.16 → 1.9.17
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,16 +12,17 @@ export const PaddleLocationDeck = ({
|
|
|
12
12
|
|
|
13
13
|
// TODO: testing
|
|
14
14
|
console.log("PaddleLocationDeck phone", phone);
|
|
15
|
+
console.log(typeof phone);
|
|
15
16
|
|
|
16
17
|
return (
|
|
17
18
|
<section className="location-deck">
|
|
18
19
|
{nodes.map((location: PaddleLocationTypes) => (
|
|
19
20
|
<PaddleLocation
|
|
20
21
|
key={location.id}
|
|
22
|
+
{...location}
|
|
21
23
|
season_start={season_start}
|
|
22
24
|
season_end={season_end}
|
|
23
25
|
phone={phone}
|
|
24
|
-
{...location}
|
|
25
26
|
/>
|
|
26
27
|
))}
|
|
27
28
|
</section>
|
package/src/paddle-location.tsx
CHANGED
|
@@ -54,13 +54,17 @@ const Season = ({
|
|
|
54
54
|
|
|
55
55
|
return (
|
|
56
56
|
<div>
|
|
57
|
-
|
|
57
|
+
{offSeasonDetails ? (
|
|
58
|
+
<p>{offSeasonDetails}</p>
|
|
59
|
+
) : (
|
|
60
|
+
<p>We're closed for the season</p>
|
|
61
|
+
)}
|
|
58
62
|
|
|
59
63
|
{currentDay < seasonStartDate ? (
|
|
60
64
|
<p>We will reopen {season_start}, Weather Permitting</p>
|
|
61
65
|
) : null}
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
|
|
64
68
|
</div>
|
|
65
69
|
);
|
|
66
70
|
}
|
|
@@ -68,7 +72,6 @@ const Season = ({
|
|
|
68
72
|
console.warn(`No season start or end date provided for ${name}. Defaulting to off season.`);
|
|
69
73
|
return (
|
|
70
74
|
<div>
|
|
71
|
-
<p>We're closed for the season</p>
|
|
72
75
|
{offSeasonDetails ? <p>{offSeasonDetails}</p> : null}
|
|
73
76
|
</div>
|
|
74
77
|
);
|
|
@@ -87,11 +90,10 @@ type ContentTypes = {
|
|
|
87
90
|
opening_time: string;
|
|
88
91
|
closing_time: string;
|
|
89
92
|
|
|
90
|
-
season_start
|
|
91
|
-
season_end
|
|
93
|
+
season_start: string;
|
|
94
|
+
season_end: string;
|
|
92
95
|
|
|
93
96
|
offSeasonDetails?: string;
|
|
94
|
-
phone?: number;
|
|
95
97
|
weatherPermitting?: boolean;
|
|
96
98
|
|
|
97
99
|
streetAddress?: string;
|
|
@@ -116,7 +118,6 @@ const Content = ({
|
|
|
116
118
|
season_start,
|
|
117
119
|
season_end,
|
|
118
120
|
offSeasonDetails,
|
|
119
|
-
phone,
|
|
120
121
|
}: ContentTypes) => {
|
|
121
122
|
return (
|
|
122
123
|
<React.Fragment>
|
|
@@ -156,10 +157,6 @@ const Content = ({
|
|
|
156
157
|
<Markdown>{description.data.description}</Markdown>
|
|
157
158
|
</div>
|
|
158
159
|
)}
|
|
159
|
-
|
|
160
|
-
{phone && (
|
|
161
|
-
<Phone phone={phone} />
|
|
162
|
-
)}
|
|
163
160
|
</div>
|
|
164
161
|
</React.Fragment>
|
|
165
162
|
);
|
|
@@ -177,16 +174,18 @@ export const PaddleLocation = ({
|
|
|
177
174
|
addressRegion,
|
|
178
175
|
postalCode,
|
|
179
176
|
commonName,
|
|
180
|
-
season_start,
|
|
181
|
-
season_end,
|
|
182
|
-
phone,
|
|
183
177
|
offSeasonDetails,
|
|
184
|
-
weatherPermitting
|
|
178
|
+
weatherPermitting,
|
|
179
|
+
showThePhone,
|
|
180
|
+
phone,
|
|
181
|
+
season_start,
|
|
182
|
+
season_end
|
|
185
183
|
}: PaddleLocationTypes) => {
|
|
186
184
|
|
|
187
185
|
|
|
188
186
|
// TODO: testing
|
|
189
187
|
console.log("PaddleLocation phone", phone);
|
|
188
|
+
console.log(typeof phone);
|
|
190
189
|
|
|
191
190
|
const content = (
|
|
192
191
|
<Content
|
|
@@ -208,7 +207,7 @@ export const PaddleLocation = ({
|
|
|
208
207
|
);
|
|
209
208
|
|
|
210
209
|
return link.includes("http") ? (
|
|
211
|
-
<div className={`location-wrapper ${
|
|
210
|
+
<div className={`location-wrapper ${showThePhone ? 'phone-spacer' : ''}`}>
|
|
212
211
|
<a
|
|
213
212
|
href={link}
|
|
214
213
|
className="location"
|
|
@@ -218,16 +217,16 @@ export const PaddleLocation = ({
|
|
|
218
217
|
>
|
|
219
218
|
{content}
|
|
220
219
|
</a>
|
|
221
|
-
{phone && (
|
|
220
|
+
{showThePhone && phone && (
|
|
222
221
|
<Phone phone={phone} />
|
|
223
222
|
)}
|
|
224
223
|
</div>
|
|
225
224
|
) : (
|
|
226
|
-
<div className={`location-wrapper ${
|
|
225
|
+
<div className={`location-wrapper ${showThePhone ? 'phone-spacer' : ''}`}>
|
|
227
226
|
<Link to={link} className="location">
|
|
228
227
|
{content}
|
|
229
228
|
</Link>
|
|
230
|
-
{phone && (
|
|
229
|
+
{showThePhone && phone && (
|
|
231
230
|
<Phone phone={phone} />
|
|
232
231
|
)}
|
|
233
232
|
</div>
|
|
@@ -22,10 +22,12 @@ export interface PaddleLocationTypes {
|
|
|
22
22
|
postalCode?: string;
|
|
23
23
|
commonName?: string;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
season_end: string;
|
|
27
|
-
phone: number;
|
|
25
|
+
showThePhone: boolean;
|
|
28
26
|
|
|
29
27
|
offSeasonDetails?: string;
|
|
30
28
|
weatherPermitting?: boolean;
|
|
29
|
+
|
|
30
|
+
phone: number;
|
|
31
|
+
season_start: string;
|
|
32
|
+
season_end: string;
|
|
31
33
|
}
|