@rileybathurst/paddle 1.8.0 → 1.9.0
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 +1 -1
- package/src/paddle-book-now.tsx +2 -2
- package/src/paddle-compare.tsx +7 -7
- package/src/paddle-seo.tsx +23 -23
- package/src/paddle-ticket.tsx +2 -2
- package/src/paddle-top-bar.tsx +14 -15
- package/src/types/paddle-book-now-types.ts +1 -1
- package/src/types/paddle-ticket-types.ts +1 -1
package/package.json
CHANGED
package/src/paddle-book-now.tsx
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import type { PaddleBookNowTypes } from "./types/paddle-book-now-types";
|
|
3
3
|
|
|
4
|
-
export const PaddleBookNow = ({ peek_base,
|
|
4
|
+
export const PaddleBookNow = ({ peek_base, strapiBranchName, specificName, specificLink }: PaddleBookNowTypes) => {
|
|
5
5
|
return (
|
|
6
6
|
<a
|
|
7
7
|
href={specificLink || peek_base}
|
|
8
8
|
rel="noopener noreferrer"
|
|
9
9
|
className="book-now"
|
|
10
|
-
title={`Book now ${specificLink && <> {specificLink} </>} with ${
|
|
10
|
+
title={`Book now ${specificLink && <> {specificLink} </>} with ${strapiBranchName} kayak and paddleboard`}
|
|
11
11
|
>
|
|
12
12
|
{specificName && (<>{specificName} <br /></>)}
|
|
13
13
|
BOOK NOW
|
package/src/paddle-compare.tsx
CHANGED
|
@@ -124,7 +124,7 @@ const CompareDetails = ({ key, title, link, sport, duration, start, finish, fitn
|
|
|
124
124
|
|
|
125
125
|
<PaddleBookNow
|
|
126
126
|
peek_base={peeks1}
|
|
127
|
-
|
|
127
|
+
strapiBranchName={strapiBranchName}
|
|
128
128
|
specificLink={peeks1}
|
|
129
129
|
/>
|
|
130
130
|
</section >
|
|
@@ -148,10 +148,10 @@ type PaddleCompareTypes = {
|
|
|
148
148
|
price: number;
|
|
149
149
|
peek?: string;
|
|
150
150
|
}[];
|
|
151
|
-
|
|
151
|
+
strapiBranchName: string;
|
|
152
152
|
peek_base: string;
|
|
153
153
|
};
|
|
154
|
-
export const PaddleCompare = ({ tours,
|
|
154
|
+
export const PaddleCompare = ({ tours, strapiBranchName, peek_base }: PaddleCompareTypes) => {
|
|
155
155
|
|
|
156
156
|
const [id1, setID1] = useState(tours[0].id);
|
|
157
157
|
const [id2, setID2] = useState(tours[1].id);
|
|
@@ -233,13 +233,13 @@ export const PaddleCompare = ({ tours, strapiLocaleName, peek_base }: PaddleComp
|
|
|
233
233
|
timeframe={timeframe1}
|
|
234
234
|
start={start1}
|
|
235
235
|
finish={finish1}
|
|
236
|
-
location={
|
|
236
|
+
location={strapiBranchName}
|
|
237
237
|
excerpt={excerpt1}
|
|
238
238
|
minimum={minimum1}
|
|
239
239
|
price={price1}
|
|
240
240
|
peeks={peeks1}
|
|
241
241
|
fitness={fitness1}
|
|
242
|
-
|
|
242
|
+
strapiBranchName={strapiBranchName}
|
|
243
243
|
peek_base={peek_base}
|
|
244
244
|
/>
|
|
245
245
|
<CompareDetails
|
|
@@ -251,13 +251,13 @@ export const PaddleCompare = ({ tours, strapiLocaleName, peek_base }: PaddleComp
|
|
|
251
251
|
timeframe={timeframe2}
|
|
252
252
|
start={start2}
|
|
253
253
|
finish={finish2}
|
|
254
|
-
location={
|
|
254
|
+
location={strapiBranchName}
|
|
255
255
|
excerpt={excerpt2}
|
|
256
256
|
minimum={minimum2}
|
|
257
257
|
price={price2}
|
|
258
258
|
peeks={peeks2}
|
|
259
259
|
fitness={fitness2}
|
|
260
|
-
|
|
260
|
+
strapiBranchName={strapiBranchName}
|
|
261
261
|
peek_base={peek_base}
|
|
262
262
|
/>
|
|
263
263
|
|
package/src/paddle-seo.tsx
CHANGED
|
@@ -50,7 +50,7 @@ type SEOtypes = {
|
|
|
50
50
|
breadcrumbs?: BreadcrumbsTypes;
|
|
51
51
|
// children: React.ReactNode;
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
strapiBranch: {
|
|
54
54
|
name: string;
|
|
55
55
|
topbar: {
|
|
56
56
|
data: {
|
|
@@ -103,21 +103,21 @@ export const PaddleSEO = ({
|
|
|
103
103
|
ogImage,
|
|
104
104
|
ogImageDescription,
|
|
105
105
|
breadcrumbs,
|
|
106
|
-
|
|
106
|
+
strapiBranch,
|
|
107
107
|
strapiLocation,
|
|
108
108
|
allStrapiLocation,
|
|
109
109
|
children,
|
|
110
110
|
}: SEOtypes) => {
|
|
111
|
-
const businessName = `${
|
|
111
|
+
const businessName = `${strapiBranch.name} Kayak & Paddleboard rentals and tours`;
|
|
112
112
|
|
|
113
113
|
const PaddleTitle = title
|
|
114
114
|
? `${title} | ${businessName}`
|
|
115
|
-
: `${businessName} | ${
|
|
115
|
+
: `${businessName} | ${strapiBranch.topbar.data.topbar} `;
|
|
116
116
|
// TODO: tagline would be a better fallback description
|
|
117
|
-
const PaddleDescription = description ||
|
|
118
|
-
// url: `${
|
|
119
|
-
const PaddleImage = ogImage ||
|
|
120
|
-
const PaddleImageAlt = ogImageDescription ||
|
|
117
|
+
const PaddleDescription = description || strapiBranch.slogan;
|
|
118
|
+
// url: `${strapiBranch.url}${SE0.url}` || strapiBranch.url,
|
|
119
|
+
const PaddleImage = ogImage || strapiBranch.ogImage;
|
|
120
|
+
const PaddleImageAlt = ogImageDescription || strapiBranch.ogImageDescription;
|
|
121
121
|
|
|
122
122
|
// const query = '- cash\n - credit card';
|
|
123
123
|
// const formatted = query.split('\n').map((item) => item.trim().replace('- ', '')).join(', ');
|
|
@@ -125,9 +125,9 @@ export const PaddleSEO = ({
|
|
|
125
125
|
|
|
126
126
|
// TODO: this is now allStrapiLocation.nodes
|
|
127
127
|
// TODO: I think this will be a keylocation piece
|
|
128
|
-
// console.log(
|
|
129
|
-
const paymentAcceptedQuery =
|
|
130
|
-
?
|
|
128
|
+
// console.log(strapiBranch.paymentAccepted);
|
|
129
|
+
const paymentAcceptedQuery = strapiBranch.paymentAccepted
|
|
130
|
+
? strapiBranch.paymentAccepted
|
|
131
131
|
: "";
|
|
132
132
|
const paymentAcceptedFormatted = paymentAcceptedQuery
|
|
133
133
|
.split("\n")
|
|
@@ -148,7 +148,7 @@ export const PaddleSEO = ({
|
|
|
148
148
|
<meta property="og:description" content={PaddleDescription} />
|
|
149
149
|
<meta property="og:image" content={PaddleImage} />
|
|
150
150
|
<meta property="og:image:alt" content={PaddleImageAlt} />
|
|
151
|
-
<meta name="theme-color" content={
|
|
151
|
+
<meta name="theme-color" content={strapiBranch.themeColor} />
|
|
152
152
|
|
|
153
153
|
<Script type="application/ld+json">
|
|
154
154
|
{`
|
|
@@ -156,8 +156,8 @@ export const PaddleSEO = ({
|
|
|
156
156
|
"@context": "https://schema.org/",
|
|
157
157
|
"@type": "LocalBusiness",
|
|
158
158
|
"name": "${businessName}",
|
|
159
|
-
"url": "${
|
|
160
|
-
"description": "${
|
|
159
|
+
"url": "${strapiBranch.url}",
|
|
160
|
+
"description": "${strapiBranch.name}",
|
|
161
161
|
"image": "${PaddleImage}",
|
|
162
162
|
"address": {
|
|
163
163
|
"@type": "PostalAddress",
|
|
@@ -192,22 +192,22 @@ export const PaddleSEO = ({
|
|
|
192
192
|
"@type": "GeoCircle",
|
|
193
193
|
"geoMidpoint": {
|
|
194
194
|
"@type": "GeoCoordinates",
|
|
195
|
-
"latitude": "${
|
|
196
|
-
"longitude": "${
|
|
195
|
+
"latitude": "${strapiBranch.latitude}",
|
|
196
|
+
"longitude": "${strapiBranch.longitude}"
|
|
197
197
|
},
|
|
198
|
-
"geoRadius": "${
|
|
198
|
+
"geoRadius": "${strapiBranch.geoRadius}"
|
|
199
199
|
},
|
|
200
|
-
"telephone": "${
|
|
201
|
-
"email": "${
|
|
202
|
-
"numberOfEmployees" : "${
|
|
203
|
-
"priceRange": "${
|
|
204
|
-
"slogan": "${
|
|
200
|
+
"telephone": "${strapiBranch.phone}",
|
|
201
|
+
"email": "${strapiBranch.email}",
|
|
202
|
+
"numberOfEmployees" : "${strapiBranch.numberOfEmployees}",
|
|
203
|
+
"priceRange": "${strapiBranch.priceRange}",
|
|
204
|
+
"slogan": "${strapiBranch.slogan}",
|
|
205
205
|
"paymentAccepted": "${paymentAcceptedFormatted}"
|
|
206
206
|
}
|
|
207
207
|
`}
|
|
208
208
|
</Script>
|
|
209
209
|
|
|
210
|
-
<Breadcrumbs url={
|
|
210
|
+
<Breadcrumbs url={strapiBranch.url} {...breadcrumbs} />
|
|
211
211
|
{children}
|
|
212
212
|
</>
|
|
213
213
|
);
|
package/src/paddle-ticket.tsx
CHANGED
|
@@ -20,7 +20,7 @@ export const PaddleTicket = ({
|
|
|
20
20
|
peek_tours_fall_back,
|
|
21
21
|
tour_page,
|
|
22
22
|
allStrapiSunsetTourTime,
|
|
23
|
-
|
|
23
|
+
strapiBranchName,
|
|
24
24
|
}: PaddleTicketTypes) => {
|
|
25
25
|
const time = PaddleTime({
|
|
26
26
|
start: start,
|
|
@@ -51,7 +51,7 @@ export const PaddleTicket = ({
|
|
|
51
51
|
<h5>${price}</h5>
|
|
52
52
|
<PaddleBookNow
|
|
53
53
|
peek_base={peek || peek_tours_fall_back}
|
|
54
|
-
|
|
54
|
+
strapiBranchName={strapiBranchName}
|
|
55
55
|
/>
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
package/src/paddle-top-bar.tsx
CHANGED
|
@@ -2,27 +2,26 @@ import * as React from "react";
|
|
|
2
2
|
import Markdown from "react-markdown";
|
|
3
3
|
|
|
4
4
|
// TODO this would be nice to be able to close but I dont have it right yet
|
|
5
|
-
|
|
5
|
+
// ! needs ranaming now I've removed the ...data or if it cant write why
|
|
6
|
+
// TODO: move this to be exported from paddle to each branch site
|
|
6
7
|
type PaddleTopBarTypes = {
|
|
7
|
-
|
|
8
|
+
strapiBranch: {
|
|
8
9
|
topbar: {
|
|
9
10
|
data: {
|
|
10
11
|
topbar: string;
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
RainCheck: string;
|
|
14
|
-
RainCheckDate: Date;
|
|
15
|
-
RainCheckReason: string;
|
|
16
14
|
};
|
|
17
15
|
}
|
|
18
|
-
export const PaddleTopBar = ({
|
|
16
|
+
export const PaddleTopBar = ({ strapiBranch }: PaddleTopBarTypes) => {
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
const
|
|
18
|
+
/* // TODO: move to weather day
|
|
19
|
+
const RainCheckDate = new Date(strapiBranch.RainCheck);
|
|
20
|
+
const currently = new Date(); */
|
|
22
21
|
|
|
23
22
|
return (
|
|
24
23
|
<div className='top-bar'>
|
|
25
|
-
{RainCheckDate > currently ? (
|
|
24
|
+
{/* {RainCheckDate > currently ? (
|
|
26
25
|
<p className="rain-check">
|
|
27
26
|
<span className="rain-check-date">
|
|
28
27
|
{RainCheckDate.toLocaleDateString('en-US', {
|
|
@@ -38,7 +37,7 @@ export const PaddleTopBar = ({ strapiLocale }: PaddleTopBarTypes) => {
|
|
|
38
37
|
minute: '2-digit',
|
|
39
38
|
hour12: true,
|
|
40
39
|
})} due to an incoming</span>
|
|
41
|
-
{
|
|
40
|
+
{strapiBranch.RainCheckReason}
|
|
42
41
|
</p>
|
|
43
42
|
) : RainCheckDate.toDateString() === currently.toDateString() ? (
|
|
44
43
|
<p className="rain-check">
|
|
@@ -47,14 +46,14 @@ export const PaddleTopBar = ({ strapiLocale }: PaddleTopBarTypes) => {
|
|
|
47
46
|
day: '2-digit',
|
|
48
47
|
year: '2-digit',
|
|
49
48
|
})}</span>
|
|
50
|
-
<span className="rain-check-reason">We're closed today due to {
|
|
49
|
+
<span className="rain-check-reason">We're closed today due to {strapiBranch.RainCheckReason}</span>
|
|
51
50
|
</p>
|
|
52
|
-
) : (
|
|
51
|
+
) : ( */}
|
|
53
52
|
<Markdown>
|
|
54
|
-
{
|
|
53
|
+
{strapiBranch.topbar.data.topbar}
|
|
55
54
|
</Markdown>
|
|
56
|
-
)
|
|
57
|
-
}
|
|
55
|
+
{/* )
|
|
56
|
+
} */}
|
|
58
57
|
</div>
|
|
59
58
|
)
|
|
60
59
|
}
|