@rileybathurst/paddle 0.0.117 → 0.0.119

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.117",
4
+ "version": "0.0.119",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -27,7 +27,6 @@
27
27
  "@storybook/addon-essentials": "^8.0.10",
28
28
  "@storybook/addon-interactions": "^8.0.10",
29
29
  "@storybook/addon-links": "^8.0.10",
30
- "@storybook/addon-onboarding": "^8.0.10",
31
30
  "@storybook/blocks": "^8.0.10",
32
31
  "@storybook/react": "^8.0.10",
33
32
  "@storybook/react-vite": "^8.0.10",
@@ -16,8 +16,6 @@ interface SeasonTypes {
16
16
  }
17
17
  function Season({ name, season_start, season_end, opening_time, closing_time, offSeasonDetails }: SeasonTypes) {
18
18
 
19
- console.log(offSeasonDetails);
20
-
21
19
  // TODO: these need a query but thats not the most important first step
22
20
  if (name === "Free Parking Lot" || name === "Parking" || name === "Delivery") {
23
21
  return null;
package/src/PaddleSEO.tsx CHANGED
@@ -100,7 +100,7 @@ export const PaddleSEO = ({ title, description, ogImage, ogImageDescription, bre
100
100
 
101
101
  const businessName = `${strapiLocale.name} Kayak & Paddleboard rentals and tours`;
102
102
 
103
- const PaddleTitle = title ? `${title} | ${businessName}` : `${businessName} | ${strapiLocale.topbar.topbar} `;
103
+ const PaddleTitle = title ? `${title} | ${businessName}` : `${businessName} | ${strapiLocale.topbar.data.topbar} `;
104
104
  // TODO: tagline would be a better fallback description
105
105
  const PaddleDescription = description || strapiLocale.slogan;
106
106
  // url: `${strapiLocale.url}${SE0.url}` || strapiLocale.url,
@@ -10,42 +10,48 @@ type PaddleTopBarTypes = {
10
10
  topbar: string;
11
11
  }
12
12
  }
13
- };
14
- allStrapiWeatherDay: {
15
- nodes: {
16
- startDate: string;
17
- startTime: string;
18
- endDate: string;
19
- endTime: string;
20
- closed: boolean;
21
- condition: {
22
- excerpt: string;
23
- }
24
- }[];
13
+ RainCheck: string;
14
+ RainCheckDate: Date;
15
+ RainCheckReason: string;
25
16
  };
26
17
  }
27
- export const PaddleTopBar = ({ strapiLocale, allStrapiWeatherDay }: PaddleTopBarTypes) => {
28
-
29
- let currentWeather = '';
30
- let currentStatus = false;
31
- const currentDate = new Date().toISOString().split('T')[0];
32
- // console.log('currentDate', currentDate);
18
+ export const PaddleTopBar = ({ strapiLocale }: PaddleTopBarTypes) => {
33
19
 
34
- allStrapiWeatherDay.nodes.map((date) => {
35
- if (date.startDate === currentDate || currentDate >= date.startDate && currentDate <= date.endDate) {
36
- currentWeather = date.condition.excerpt;
37
- currentStatus = date.closed;
38
-
39
- // console.log('inside the if', date.startDate);
40
- }
41
- });
20
+ const RainCheckDate = new Date(strapiLocale.RainCheck);
21
+ const currently = new Date();
42
22
 
43
23
  return (
44
- <div className={`top-bar ${currentStatus ? 'closed' : 'open'}`} >
45
- {currentWeather ? <p>{currentWeather}</p> :
46
- <Markdown>
47
- {strapiLocale.topbar.data.topbar}
48
- </Markdown>
24
+ <div className={`${location} top-bar`}>
25
+ {RainCheckDate > currently ? (
26
+ <p className="rain-check">
27
+ <span className="rain-check-date">
28
+ {RainCheckDate.toLocaleDateString('en-US', {
29
+ month: '2-digit',
30
+ day: '2-digit',
31
+ year: '2-digit',
32
+ })}
33
+ </span>
34
+ &nbsp;We will be closing at&nbsp;
35
+ <span className="rain-check-time">
36
+ {RainCheckDate.toLocaleTimeString('en-US', {
37
+ hour: '2-digit',
38
+ minute: '2-digit',
39
+ hour12: true,
40
+ })} due to an incoming</span>
41
+ &nbsp;{strapiLocale.RainCheckReason}
42
+ </p>
43
+ ) : RainCheckDate.toDateString() === currently.toDateString() ? (
44
+ <p className="rain-check">
45
+ <span className="rain-check-date">{RainCheckDate.toLocaleDateString('en-US', {
46
+ month: '2-digit',
47
+ day: '2-digit',
48
+ year: '2-digit',
49
+ })}</span>&nbsp;
50
+ <span className="rain-check-reason">We're closed today due to {strapiLocale.RainCheckReason}</span>
51
+ </p>
52
+ ) : (
53
+ <p>We&apos;re Open for the 2024 Summer</p>
54
+ )
49
55
  }
50
56
  </div>
51
57
  )