@rileybathurst/paddle 0.0.53 → 0.0.54
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/PaddleSEO.tsx +13 -13
package/package.json
CHANGED
package/src/PaddleSEO.tsx
CHANGED
|
@@ -2,10 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { Script } from "gatsby";
|
|
3
3
|
|
|
4
4
|
interface BreadcrumbsTypes {
|
|
5
|
-
url
|
|
5
|
+
url?: string;
|
|
6
6
|
[key: number]: {
|
|
7
|
-
name
|
|
8
|
-
item
|
|
7
|
+
name?: string;
|
|
8
|
+
item?: string;
|
|
9
9
|
};
|
|
10
10
|
}[]
|
|
11
11
|
// I could probably pass it two arguments instead but for now
|
|
@@ -41,13 +41,13 @@ function Breadcrumbs(breadcrumbs: BreadcrumbsTypes) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
type SEOtypes = {
|
|
44
|
-
title
|
|
45
|
-
description
|
|
44
|
+
title?: string;
|
|
45
|
+
description?: string;
|
|
46
46
|
url: string;
|
|
47
|
-
ogImage
|
|
48
|
-
|
|
49
|
-
breadcrumbs
|
|
50
|
-
children: React.ReactNode;
|
|
47
|
+
ogImage?: string;
|
|
48
|
+
ogImagedescription?: string;
|
|
49
|
+
breadcrumbs?: BreadcrumbsTypes;
|
|
50
|
+
// children: React.ReactNode;
|
|
51
51
|
|
|
52
52
|
strapiLocale: {
|
|
53
53
|
name: string;
|
|
@@ -61,7 +61,7 @@ type SEOtypes = {
|
|
|
61
61
|
geoRadius: string;
|
|
62
62
|
phone: string;
|
|
63
63
|
ogImage: string;
|
|
64
|
-
|
|
64
|
+
ogImagedescription: string;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
strapiLocation: {
|
|
@@ -76,7 +76,7 @@ type SEOtypes = {
|
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export const PaddleSEO = ({ title, description, ogImage,
|
|
79
|
+
export const PaddleSEO = ({ title, description, ogImage, ogImagedescription, breadcrumbs, strapiLocale, strapiLocation }: SEOtypes) => {
|
|
80
80
|
|
|
81
81
|
const businessName = `${strapiLocale.name} Kayak & Paddleboard rentals and tours`;
|
|
82
82
|
|
|
@@ -85,14 +85,14 @@ export const PaddleSEO = ({ title, description, ogImage, ogimagedescription, bre
|
|
|
85
85
|
const PaddleDescription = description || businessName;
|
|
86
86
|
// url: `${strapiLocale.url}${SE0.url}` || strapiLocale.url,
|
|
87
87
|
const PaddleImage = ogImage || strapiLocale.ogImage;
|
|
88
|
-
const PaddleImageAlt =
|
|
88
|
+
const PaddleImageAlt = ogImagedescription || strapiLocale.ogImagedescription;
|
|
89
89
|
|
|
90
90
|
// const query = '- cash\n - credit card';
|
|
91
91
|
// const formatted = query.split('\n').map((item) => item.trim().replace('- ', '')).join(', ');
|
|
92
92
|
// console.log(formatted);
|
|
93
93
|
|
|
94
94
|
// console.log(strapiLocation.paymentAccepted);
|
|
95
|
-
const paymentAcceptedQuery = strapiLocation.paymentAccepted;
|
|
95
|
+
const paymentAcceptedQuery = strapiLocation.paymentAccepted ? strapiLocation.paymentAccepted : '';
|
|
96
96
|
const paymentAcceptedFormatted = paymentAcceptedQuery.split('\n').map((payment: string) => payment.trim().replace('- ', '')).join(', ');
|
|
97
97
|
// console.log(paymentAcceptedFormatted);
|
|
98
98
|
|