@rileybathurst/paddle 1.9.23 → 1.9.24

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.23",
4
+ "version": "1.9.24",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "tsc --noEmit && stay-gold && vite",
package/src/index.tsx CHANGED
@@ -39,6 +39,6 @@ export * from "./types/paddle-location-deck-types";
39
39
  export * from "./types/paddle-gatsby-image-type";
40
40
  export * from "./types/paddle-purchase-types";
41
41
  export * from "./types/paddle-purchase-image-types";
42
- export * from "./types/paddle-brand-types";
42
+ export * from "./types/paddle-branded-types";
43
43
  export * from "./types/paddle-book-now-types";
44
44
  export * from "./types/paddle-testimonial-types";
@@ -1,13 +1,13 @@
1
1
  import * as React from "react"
2
2
  import { Link } from 'gatsby';
3
3
  import SVG from 'react-inlinesvg';
4
- import type { PaddleBrandType } from "./types/paddle-brand-types";
4
+ import type { PaddleBrandedTypes } from "./types/paddle-branded-types";
5
5
 
6
- export const PaddleBrandList = ({ nodes, sport }: { nodes: PaddleBrandType[]; sport?: string }) => {
6
+ export const PaddleBrandList = ({ nodes, sport }: { nodes: PaddleBrandedTypes[]; sport?: string }) => {
7
7
 
8
8
  return (
9
9
  <ul className='brand_list'>
10
- {nodes.map((brand: PaddleBrandType) => (
10
+ {nodes.map((brand: PaddleBrandedTypes) => (
11
11
  <li key={brand.id}>
12
12
  <Link to={`/retail/${sport}/${brand.slug}`}>
13
13
  {brand.svg ?
@@ -20,9 +20,10 @@ type SpecsTypes = {
20
20
  }
21
21
  // * moving the section tag to the parent component means you can loop yourself
22
22
  export const PaddleSpecs = (specs: SpecsTypes) =>
23
- // <section className='specs'>
24
23
  Object.entries(specs).map(([key, value]) => {
25
- // console.log(key, value);
24
+
25
+ console.log(key);
26
+ console.log(value);
26
27
 
27
28
  if (!value) {
28
29
  console.warn(`Missing value for ${key}`);
@@ -41,15 +42,6 @@ export const PaddleSpecs = (specs: SpecsTypes) =>
41
42
  // * I cant remeber others yet
42
43
  }
43
44
 
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
45
  if (key === "cost" && typeof value === "object" && value.discount) {
54
46
  const amount = (Number(value.price) -
55
47
  Number(value.discount) * (Number(value.price) / 100)) as number;
@@ -74,8 +66,8 @@ export const PaddleSpecs = (specs: SpecsTypes) =>
74
66
  );
75
67
  }
76
68
 
77
- /* I didnt know you could call yourself like this */
78
- /* I guess its not a infinite loop as its not calling an object */
69
+ /* // * this should be working for weight */
70
+ // The key kinda seems like its being thrown awaywhich is fine
79
71
  if (typeof value === "object") {
80
72
  return <PaddleSpecs {...value} />;
81
73
  }
@@ -0,0 +1,10 @@
1
+ import { PaddlePurchaseTypes } from "./paddle-purchase-types";
2
+
3
+ export type PaddleBrandedTypes = PaddlePurchaseTypes & {
4
+ brand: {
5
+ id: string;
6
+ slug: string;
7
+ name: string;
8
+ svg?: string;
9
+ };
10
+ }
@@ -1,6 +0,0 @@
1
- export type PaddleBrandType = {
2
- id: React.Key;
3
- slug: string;
4
- svg: string;
5
- name: string;
6
- };