@rileybathurst/paddle 0.0.62 → 0.0.64
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/README.md +2 -0
- package/package.json +1 -1
- package/src/PaddleSEO.tsx +9 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/src/PaddleSEO.tsx
CHANGED
|
@@ -10,7 +10,9 @@ interface BreadcrumbsTypes {
|
|
|
10
10
|
}[]
|
|
11
11
|
// I could probably pass it two arguments instead but for now
|
|
12
12
|
function Breadcrumbs(breadcrumbs: BreadcrumbsTypes) {
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
// TODO: this was pushing on index with !
|
|
15
|
+
if (Object.entries(breadcrumbs).length === 0) return null;
|
|
14
16
|
|
|
15
17
|
// remove the breadcrumbs.url from the Object.entries
|
|
16
18
|
// console.log(breadcrumbs.url);
|
|
@@ -71,6 +73,7 @@ type SEOtypes = {
|
|
|
71
73
|
|
|
72
74
|
allStrapiLocation: {
|
|
73
75
|
nodes: {
|
|
76
|
+
name: string;
|
|
74
77
|
schemaType: string;
|
|
75
78
|
streetAddress: string;
|
|
76
79
|
addressLocality: string;
|
|
@@ -82,6 +85,8 @@ type SEOtypes = {
|
|
|
82
85
|
closing_time: string;
|
|
83
86
|
}[];
|
|
84
87
|
};
|
|
88
|
+
|
|
89
|
+
children: React.ReactNode;
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, breadcrumbs, strapiLocale, allStrapiLocation, children }: SEOtypes) => {
|
|
@@ -106,6 +111,8 @@ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, bre
|
|
|
106
111
|
const paymentAcceptedFormatted = paymentAcceptedQuery.split('\n').map((payment: string) => payment.trim().replace('- ', '')).join(', ');
|
|
107
112
|
// console.log(paymentAcceptedFormatted);
|
|
108
113
|
|
|
114
|
+
console.log(children);
|
|
115
|
+
|
|
109
116
|
return (
|
|
110
117
|
<>
|
|
111
118
|
<title>{PaddleTitle}</title>
|
|
@@ -132,6 +139,7 @@ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, bre
|
|
|
132
139
|
"department": [
|
|
133
140
|
${allStrapiLocation.nodes.map((location) => {
|
|
134
141
|
return `{
|
|
142
|
+
"name": "${location.name}",
|
|
135
143
|
"@type": "${location.schemaType}",
|
|
136
144
|
"address": {
|
|
137
145
|
"@type": "PostalAddress",
|