@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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "1.8.0",
4
+ "version": "1.9.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -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, strapiLocaleName, specificName, specificLink }: PaddleBookNowTypes) => {
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 ${strapiLocaleName} kayak and paddleboard`}
10
+ title={`Book now ${specificLink && <> {specificLink} </>} with ${strapiBranchName} kayak and paddleboard`}
11
11
  >
12
12
  {specificName && (<>{specificName} <br /></>)}
13
13
  BOOK NOW
@@ -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
- strapiLocaleName={strapiLocaleName}
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
- strapiLocaleName: string;
151
+ strapiBranchName: string;
152
152
  peek_base: string;
153
153
  };
154
- export const PaddleCompare = ({ tours, strapiLocaleName, peek_base }: PaddleCompareTypes) => {
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={strapiLocaleName}
236
+ location={strapiBranchName}
237
237
  excerpt={excerpt1}
238
238
  minimum={minimum1}
239
239
  price={price1}
240
240
  peeks={peeks1}
241
241
  fitness={fitness1}
242
- strapiLocaleName={strapiLocaleName}
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={strapiLocaleName}
254
+ location={strapiBranchName}
255
255
  excerpt={excerpt2}
256
256
  minimum={minimum2}
257
257
  price={price2}
258
258
  peeks={peeks2}
259
259
  fitness={fitness2}
260
- strapiLocaleName={strapiLocaleName}
260
+ strapiBranchName={strapiBranchName}
261
261
  peek_base={peek_base}
262
262
  />
263
263
 
@@ -50,7 +50,7 @@ type SEOtypes = {
50
50
  breadcrumbs?: BreadcrumbsTypes;
51
51
  // children: React.ReactNode;
52
52
 
53
- strapiLocale: {
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
- strapiLocale,
106
+ strapiBranch,
107
107
  strapiLocation,
108
108
  allStrapiLocation,
109
109
  children,
110
110
  }: SEOtypes) => {
111
- const businessName = `${strapiLocale.name} Kayak & Paddleboard rentals and tours`;
111
+ const businessName = `${strapiBranch.name} Kayak & Paddleboard rentals and tours`;
112
112
 
113
113
  const PaddleTitle = title
114
114
  ? `${title} | ${businessName}`
115
- : `${businessName} | ${strapiLocale.topbar.data.topbar} `;
115
+ : `${businessName} | ${strapiBranch.topbar.data.topbar} `;
116
116
  // TODO: tagline would be a better fallback description
117
- const PaddleDescription = description || strapiLocale.slogan;
118
- // url: `${strapiLocale.url}${SE0.url}` || strapiLocale.url,
119
- const PaddleImage = ogImage || strapiLocale.ogImage;
120
- const PaddleImageAlt = ogImageDescription || strapiLocale.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(strapiLocale.paymentAccepted);
129
- const paymentAcceptedQuery = strapiLocale.paymentAccepted
130
- ? strapiLocale.paymentAccepted
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={strapiLocale.themeColor} />
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": "${strapiLocale.url}",
160
- "description": "${strapiLocale.name}",
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": "${strapiLocale.latitude}",
196
- "longitude": "${strapiLocale.longitude}"
195
+ "latitude": "${strapiBranch.latitude}",
196
+ "longitude": "${strapiBranch.longitude}"
197
197
  },
198
- "geoRadius": "${strapiLocale.geoRadius}"
198
+ "geoRadius": "${strapiBranch.geoRadius}"
199
199
  },
200
- "telephone": "${strapiLocale.phone}",
201
- "email": "${strapiLocale.email}",
202
- "numberOfEmployees" : "${strapiLocale.numberOfEmployees}",
203
- "priceRange": "${strapiLocale.priceRange}",
204
- "slogan": "${strapiLocale.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={strapiLocale.url} {...breadcrumbs} />
210
+ <Breadcrumbs url={strapiBranch.url} {...breadcrumbs} />
211
211
  {children}
212
212
  </>
213
213
  );
@@ -20,7 +20,7 @@ export const PaddleTicket = ({
20
20
  peek_tours_fall_back,
21
21
  tour_page,
22
22
  allStrapiSunsetTourTime,
23
- strapiLocaleName,
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
- strapiLocaleName={strapiLocaleName}
54
+ strapiBranchName={strapiBranchName}
55
55
  />
56
56
  </div>
57
57
  </div>
@@ -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
- strapiLocale: {
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 = ({ strapiLocale }: PaddleTopBarTypes) => {
16
+ export const PaddleTopBar = ({ strapiBranch }: PaddleTopBarTypes) => {
19
17
 
20
- const RainCheckDate = new Date(strapiLocale.RainCheck);
21
- const currently = new Date();
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
- &nbsp;{strapiLocale.RainCheckReason}
40
+ &nbsp;{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>&nbsp;
50
- <span className="rain-check-reason">We're closed today due to {strapiLocale.RainCheckReason}</span>
49
+ <span className="rain-check-reason">We're closed today due to {strapiBranch.RainCheckReason}</span>
51
50
  </p>
52
- ) : (
51
+ ) : ( */}
53
52
  <Markdown>
54
- {strapiLocale.topbar.data.topbar}
53
+ {strapiBranch.topbar.data.topbar}
55
54
  </Markdown>
56
- )
57
- }
55
+ {/* )
56
+ } */}
58
57
  </div>
59
58
  )
60
59
  }
@@ -1,6 +1,6 @@
1
1
  export type PaddleBookNowTypes = {
2
2
  peek_base: string;
3
- strapiLocaleName: string;
3
+ strapiBranchName: string;
4
4
  specificName?: string;
5
5
  specificLink?: string;
6
6
  };
@@ -28,5 +28,5 @@ export type PaddleTicketTypes = {
28
28
  }[];
29
29
  };
30
30
 
31
- strapiLocaleName: string;
31
+ strapiBranchName: string;
32
32
  };