@rileybathurst/paddle 0.0.57 → 0.0.58

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": "0.0.57",
4
+ "version": "0.0.58",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
package/src/PaddleSEO.tsx CHANGED
@@ -45,7 +45,7 @@ type SEOtypes = {
45
45
  description?: string;
46
46
  url: string;
47
47
  ogImage?: string;
48
- ogImagedescription?: string;
48
+ ogImageDescription?: string;
49
49
  breadcrumbs?: BreadcrumbsTypes;
50
50
  // children: React.ReactNode;
51
51
 
@@ -60,8 +60,13 @@ type SEOtypes = {
60
60
  longitude: string;
61
61
  geoRadius: string;
62
62
  phone: string;
63
+ email: string;
63
64
  ogImage: string;
64
- ogImagedescription: string;
65
+ ogImageDescription: string;
66
+ paymentAccepted: string;
67
+ numberOfEmployees: string;
68
+ priceRange: string;
69
+ slogan: string;
65
70
  };
66
71
 
67
72
  allStrapiLocation: {
@@ -78,16 +83,16 @@ type SEOtypes = {
78
83
  };
79
84
  }
80
85
 
81
- export const PaddleSEO = ({ title, description, ogImage, ogImagedescription, breadcrumbs, strapiLocale, allStrapiLocation }: SEOtypes) => {
86
+ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, breadcrumbs, strapiLocale, allStrapiLocation }: SEOtypes) => {
82
87
 
83
88
  const businessName = `${strapiLocale.name} Kayak & Paddleboard rentals and tours`;
84
89
 
85
90
  const PaddleTitle = title ? `${title} | ${businessName}` : `${businessName} | ${strapiLocale.topbar.topbar} `;
86
91
  // TODO: tagline would be a better fallback description
87
- const PaddleDescription = description || businessName;
92
+ const PaddleDescription = description || strapiLocale.slogan;
88
93
  // url: `${strapiLocale.url}${SE0.url}` || strapiLocale.url,
89
94
  const PaddleImage = ogImage || strapiLocale.ogImage;
90
- const PaddleImageAlt = ogImagedescription || strapiLocale.ogImagedescription;
95
+ const PaddleImageAlt = ogImageDescription || strapiLocale.ogImageDescription;
91
96
 
92
97
  // const query = '- cash\n - credit card';
93
98
  // const formatted = query.split('\n').map((item) => item.trim().replace('- ', '')).join(', ');
@@ -95,10 +100,10 @@ export const PaddleSEO = ({ title, description, ogImage, ogImagedescription, bre
95
100
 
96
101
  // TODO: this is now allStrapiLocation.nodes
97
102
  // TODO: I think this will be a keylocation piece
98
- // console.log(strapiLocation.paymentAccepted);
99
- // const paymentAcceptedQuery = strapiLocation.paymentAccepted ? strapiLocation.paymentAccepted : '';
100
- // const paymentAcceptedFormatted = paymentAcceptedQuery.split('\n').map((payment: string) => payment.trim().replace('- ', '')).join(', ');
101
- // console.log(paymentAcceptedFormatted);
103
+ console.log(strapiLocale.paymentAccepted);
104
+ const paymentAcceptedQuery = strapiLocale.paymentAccepted ? strapiLocale.paymentAccepted : '';
105
+ const paymentAcceptedFormatted = paymentAcceptedQuery.split('\n').map((payment: string) => payment.trim().replace('- ', '')).join(', ');
106
+ console.log(paymentAcceptedFormatted);
102
107
 
103
108
  return (
104
109
  <>
@@ -149,6 +154,12 @@ export const PaddleSEO = ({ title, description, ogImage, ogImagedescription, bre
149
154
  "geoRadius": "${strapiLocale.geoRadius}"
150
155
  },
151
156
  "telephone": "${strapiLocale.phone}",
157
+ "email": "${strapiLocale.email}",
158
+
159
+ "numberOfEmployees" : "${strapiLocale.numberOfEmployees}",
160
+ "priceRange": "${strapiLocale.priceRange}",
161
+ "slogan": "${strapiLocale.slogan}",
162
+ "paymentAccepted": "${paymentAcceptedFormatted}",
152
163
  }
153
164
  `}
154
165
  </Script>
@@ -157,4 +168,25 @@ export const PaddleSEO = ({ title, description, ogImage, ogImagedescription, bre
157
168
  {/* {SE0.children} */}
158
169
  </>
159
170
  );
160
- };
171
+ };
172
+
173
+ // TODO: image alt in rich data
174
+
175
+ /* "openingHoursSpecification": [
176
+ ${allStrapiLocation.nodes.map((location) => {
177
+ return `{
178
+ "@type": "OpeningHoursSpecification",
179
+ "dayOfWeek": [
180
+ "Monday",
181
+ "Tuesday",
182
+ "Wednesday",
183
+ "Thursday",
184
+ "Friday",
185
+ "Saturday",
186
+ "Sunday"
187
+ ],
188
+ "opens": "${location.opening_time}",
189
+ "closes": "${location.closing_time}"
190
+ }`
191
+ })}
192
+ ], */
@@ -57,6 +57,8 @@ footer,
57
57
 
58
58
  /*------------------------------------*/
59
59
 
60
+ /* TODO: media queries for the nested wraps */
61
+
60
62
  .wrap,
61
63
  .deck,
62
64
  footer {
@@ -261,7 +263,8 @@ header {
261
263
  /* max-height: 23rem; TODO: guess and check can I use a variable */
262
264
  /* overflow: hidden; */
263
265
 
264
- .gatsby-image-wrapper {
266
+ .gatsby-image-wrapper,
267
+ .storybook-gatsby-image {
265
268
  max-width: 100%;
266
269
  }
267
270