@rileybathurst/paddle 1.2.5 → 1.2.6
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": "1.2.
|
|
4
|
+
"version": "1.2.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"react": "^18.3.1",
|
|
21
21
|
"react-aria-components": "^1.10.0",
|
|
22
22
|
"react-dom": "^18.3.1",
|
|
23
|
+
"react-inlinesvg": "^4.2.0",
|
|
23
24
|
"react-markdown": "^10.1.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
package/src/PaddleBrandList.tsx
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { Link } from 'gatsby';
|
|
3
|
+
import SVG from 'react-inlinesvg';
|
|
3
4
|
|
|
4
5
|
// * additional work is done here to split kayak and paddleboard
|
|
5
6
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type BrandType = {
|
|
8
|
+
id: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
svg: string;
|
|
11
|
+
name: string;
|
|
12
|
+
retail: {
|
|
13
|
+
title: string;
|
|
9
14
|
slug: string;
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
retail: {
|
|
13
|
-
title: string;
|
|
15
|
+
sport: {
|
|
14
16
|
slug: string;
|
|
15
|
-
|
|
16
|
-
slug: string;
|
|
17
|
-
}
|
|
18
|
-
}[]
|
|
17
|
+
}
|
|
19
18
|
}[];
|
|
20
|
-
|
|
21
|
-
}
|
|
19
|
+
};
|
|
22
20
|
|
|
23
|
-
const PaddleBrandList = ({ nodes, sport }:
|
|
21
|
+
const PaddleBrandList = ({ nodes, sport }: { nodes: BrandType[]; sport?: string }) => {
|
|
24
22
|
|
|
25
|
-
const BrandSet = new Set();
|
|
26
|
-
let BrandArray = [];
|
|
23
|
+
const BrandSet = new Set<BrandType>();
|
|
24
|
+
let BrandArray: BrandType[] = [];
|
|
27
25
|
|
|
28
26
|
if (sport) {
|
|
29
27
|
nodes.map((brand) => {
|
|
@@ -45,12 +43,12 @@ const PaddleBrandList = ({ nodes, sport }: BrandListTypes) => {
|
|
|
45
43
|
|
|
46
44
|
return (
|
|
47
45
|
<ul className='brand_list'>
|
|
48
|
-
{BrandArray.map((brand:
|
|
46
|
+
{BrandArray.map((brand: BrandType) => (
|
|
49
47
|
<li key={brand.id}>
|
|
50
48
|
<Link to={`/retail/${sport}/${brand.slug}`}>
|
|
51
49
|
{brand.svg ?
|
|
52
|
-
<
|
|
53
|
-
|
|
50
|
+
<SVG
|
|
51
|
+
src={brand.svg}
|
|
54
52
|
/>
|
|
55
53
|
: null}
|
|
56
54
|
{brand.name}
|
|
@@ -5,6 +5,7 @@ import Markdown from "react-markdown";
|
|
|
5
5
|
import HourMin from "./hour-min";
|
|
6
6
|
import Phone from "./phone";
|
|
7
7
|
import type { PaddleLocationCardTypes } from "./types/location-card-types";
|
|
8
|
+
import SVG from 'react-inlinesvg';
|
|
8
9
|
|
|
9
10
|
// merged types are possible to dry this up but its also a lot
|
|
10
11
|
// type UpdatedUser = Merge<User, Updates>;
|
|
@@ -101,12 +102,6 @@ interface ContentTypes {
|
|
|
101
102
|
svg: string;
|
|
102
103
|
name: string;
|
|
103
104
|
|
|
104
|
-
address: {
|
|
105
|
-
data: {
|
|
106
|
-
address: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
|
|
110
105
|
description: {
|
|
111
106
|
data: {
|
|
112
107
|
description: string;
|
|
@@ -156,12 +151,12 @@ const PhoneContent = ({
|
|
|
156
151
|
rel="noopener noreferrer"
|
|
157
152
|
title={name}
|
|
158
153
|
>
|
|
159
|
-
<
|
|
154
|
+
<SVG src={svg} />
|
|
160
155
|
</a>
|
|
161
156
|
) : (
|
|
162
157
|
link && (
|
|
163
158
|
<Link to={link} className="svg">
|
|
164
|
-
<
|
|
159
|
+
<SVG src={svg} />
|
|
165
160
|
</Link>
|
|
166
161
|
)
|
|
167
162
|
)}
|
|
@@ -263,7 +258,9 @@ const Content = ({
|
|
|
263
258
|
}: ContentTypes) => {
|
|
264
259
|
return (
|
|
265
260
|
<>
|
|
266
|
-
<div className="svg"
|
|
261
|
+
<div className="svg">
|
|
262
|
+
<SVG src={svg} />
|
|
263
|
+
</div>
|
|
267
264
|
|
|
268
265
|
<div className="location_details">
|
|
269
266
|
<div className="multi_button">
|
|
@@ -308,7 +305,6 @@ export const PaddleLocationCard = ({
|
|
|
308
305
|
svg,
|
|
309
306
|
name,
|
|
310
307
|
link,
|
|
311
|
-
address,
|
|
312
308
|
description,
|
|
313
309
|
opening_time,
|
|
314
310
|
closing_time,
|
|
@@ -334,7 +330,6 @@ export const PaddleLocationCard = ({
|
|
|
334
330
|
link={link}
|
|
335
331
|
svg={svg}
|
|
336
332
|
name={name}
|
|
337
|
-
address={address}
|
|
338
333
|
description={description}
|
|
339
334
|
opening_time={opening_time}
|
|
340
335
|
closing_time={closing_time}
|
|
@@ -365,7 +360,6 @@ export const PaddleLocationCard = ({
|
|
|
365
360
|
<Content
|
|
366
361
|
svg={svg}
|
|
367
362
|
name={name}
|
|
368
|
-
address={address}
|
|
369
363
|
description={description}
|
|
370
364
|
opening_time={opening_time}
|
|
371
365
|
closing_time={closing_time}
|
|
@@ -387,7 +381,6 @@ export const PaddleLocationCard = ({
|
|
|
387
381
|
<Content
|
|
388
382
|
svg={svg}
|
|
389
383
|
name={name}
|
|
390
|
-
address={address}
|
|
391
384
|
description={description}
|
|
392
385
|
opening_time={opening_time}
|
|
393
386
|
closing_time={closing_time}
|
|
@@ -2,19 +2,12 @@ import * as React from "react";
|
|
|
2
2
|
import { PaddleLocationCard } from "./PaddleLocationCard";
|
|
3
3
|
import type { PaddleLocationCardTypes } from "./types/location-card-types";
|
|
4
4
|
|
|
5
|
-
interface LocationDeckTypes {
|
|
6
|
-
background?: string;
|
|
7
|
-
season_start?: string; // ? should this be optional? it created a problem with tours
|
|
8
|
-
season_end?: string;
|
|
9
|
-
phone?: string;
|
|
10
|
-
nodes: PaddleLocationCardTypes[];
|
|
11
|
-
}
|
|
12
5
|
export const PaddleLocationDeck = ({
|
|
13
6
|
nodes,
|
|
14
7
|
season_start,
|
|
15
8
|
season_end,
|
|
16
9
|
phone
|
|
17
|
-
}:
|
|
10
|
+
}: PaddleLocationDeckTypes) => {
|
|
18
11
|
return (
|
|
19
12
|
<section className="location-deck">
|
|
20
13
|
{nodes.map((location: PaddleLocationCardTypes) => (
|
package/src/index.tsx
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PaddleLocationCardTypes } from "./location-card-types";
|
|
2
|
+
|
|
3
|
+
export type PaddleLocationDeckTypes = {
|
|
4
|
+
background?: string;
|
|
5
|
+
season_start?: string; // ? should this be optional? it created a problem with tours
|
|
6
|
+
season_end?: string;
|
|
7
|
+
phone?: string;
|
|
8
|
+
nodes: PaddleLocationCardTypes[];
|
|
9
|
+
};
|