@rileybathurst/paddle 0.0.69 → 0.0.71

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/PaddleSEO.tsx +18 -11
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rileybathurst/paddle",
3
3
  "private": false,
4
- "version": "0.0.69",
4
+ "version": "0.0.71",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
package/src/PaddleSEO.tsx CHANGED
@@ -15,18 +15,10 @@ function Breadcrumbs(breadcrumbs: BreadcrumbsTypes) {
15
15
  // console.log(breadcrumbs.url);
16
16
  const { url, ...rest } = breadcrumbs;
17
17
 
18
- console.log(breadcrumbs);
19
- console.log(rest);
20
-
21
- // TODO: testing
22
18
  if (Object.keys(rest).length === 0) {
23
- console.error('🦖');
24
19
  return null;
25
20
  }
26
21
 
27
- console.log('🦊');
28
-
29
- // console.log(rest);
30
22
 
31
23
  return (
32
24
  <Script type="application/ld+json">
@@ -79,6 +71,13 @@ type SEOtypes = {
79
71
  slogan: string;
80
72
  };
81
73
 
74
+ strapiLocation: {
75
+ streetAddress: string;
76
+ addressLocality: string;
77
+ addressRegion: string;
78
+ postalCode: string;
79
+ };
80
+
82
81
  allStrapiLocation: {
83
82
  nodes: {
84
83
  name: string;
@@ -97,7 +96,7 @@ type SEOtypes = {
97
96
  children: React.ReactNode;
98
97
  }
99
98
 
100
- export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, breadcrumbs, strapiLocale, allStrapiLocation, children }: SEOtypes) => {
99
+ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, breadcrumbs, strapiLocale, strapiLocation, allStrapiLocation, children }: SEOtypes) => {
101
100
 
102
101
  const businessName = `${strapiLocale.name} Kayak & Paddleboard rentals and tours`;
103
102
 
@@ -143,7 +142,14 @@ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, bre
143
142
  "url": "${strapiLocale.url}",
144
143
  "description": "${strapiLocale.name}",
145
144
  "image": "${PaddleImage}",
146
-
145
+ "address": {
146
+ "@type": "PostalAddress",
147
+ "streetAddress": "${strapiLocation.streetAddress}",
148
+ "addressLocality": "${strapiLocation.addressLocality}",
149
+ "addressRegion": "${strapiLocation.addressRegion}",
150
+ "postalCode": "${strapiLocation.postalCode}",
151
+ "addressCountry": "US"
152
+ },
147
153
  "department": [
148
154
  ${allStrapiLocation.nodes.map((location) => {
149
155
  return `{
@@ -154,7 +160,8 @@ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, bre
154
160
  "streetAddress": "${location.streetAddress}",
155
161
  "addressLocality": "${location.addressLocality}",
156
162
  "addressRegion": "${location.addressRegion}",
157
- "postalCode": "${location.postalCode}"
163
+ "postalCode": "${location.postalCode}",
164
+ "addressCountry": "US"
158
165
  }
159
166
  }`
160
167
  })}