@rileybathurst/paddle 1.9.20 → 1.9.22

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.9.20",
4
+ "version": "1.9.22",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
@@ -3,34 +3,11 @@ import { Link } from 'gatsby';
3
3
  import SVG from 'react-inlinesvg';
4
4
  import type { PaddleBrandType } from "./types/paddle-brand-types";
5
5
 
6
- // * additional work is done here to split kayak and paddleboard
7
-
8
6
  export const PaddleBrandList = ({ nodes, sport }: { nodes: PaddleBrandType[]; sport?: string }) => {
9
7
 
10
- const BrandSet = new Set<PaddleBrandType>();
11
- let BrandArray: PaddleBrandType[] = [];
12
-
13
- if (sport) {
14
- nodes.map((brand) => {
15
- brand.retail.map((retail) => {
16
-
17
- if (retail.sport.slug === sport) {
18
- BrandSet.add(brand);
19
- }
20
-
21
- return BrandSet;
22
- })
23
- });
24
-
25
- BrandArray = (Array.from(BrandSet));
26
- } else {
27
- // TODO: this needs a check if anything is published in the brand if no sport is passed
28
- BrandArray = (Array.from(nodes));
29
- }
30
-
31
8
  return (
32
9
  <ul className='brand_list'>
33
- {BrandArray.map((brand: PaddleBrandType) => (
10
+ {nodes.map((brand: PaddleBrandType) => (
34
11
  <li key={brand.id}>
35
12
  <Link to={`/retail/${sport}/${brand.slug}`}>
36
13
  {brand.svg ?
@@ -10,10 +10,12 @@ const specs: SpecsTypes = {
10
10
  unit: "px", // ✅ string
11
11
  }
12
12
  } */
13
+ // * number[] is for cost when passing both price and discount
14
+ // or
13
15
  type SpecsTypes = {
14
16
  [key: string]: | string | number
15
17
  | {
16
- [key: string]: string | number;
18
+ [key: string]: string | number | number[];
17
19
  };
18
20
  }
19
21
  // * moving the section tag to the parent component means you can loop yourself