ps99-api 2.3.2 → 2.4.0

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.
Files changed (53) hide show
  1. package/.idea/node-ps99-api.iml +1 -0
  2. package/README.md +1 -1
  3. package/dist/responses/collection/achievement.d.ts +2 -0
  4. package/dist/responses/collection/guild-battle.d.ts +2 -4
  5. package/dist/responses/collection/rank.d.ts +1 -0
  6. package/dist/responses/collection/seed.d.ts +1 -0
  7. package/dist/responses/exists.d.ts +2 -0
  8. package/example-web/react2/public/service-worker.js +6 -6
  9. package/example-web/react2/src/App.tsx +8 -2
  10. package/example-web/react2/src/components/AchievementsComponent.tsx +23 -30
  11. package/example-web/react2/src/components/BoostsComponent.tsx +6 -13
  12. package/example-web/react2/src/components/BoothsComponent.tsx +52 -20
  13. package/example-web/react2/src/components/BoxesComponent.tsx +17 -24
  14. package/example-web/react2/src/components/BuffsComponent.tsx +35 -13
  15. package/example-web/react2/src/components/CharmsComponent.tsx +25 -30
  16. package/example-web/react2/src/components/CurrencyComponent.tsx +37 -44
  17. package/example-web/react2/src/components/DynamicCollectionConfigData.tsx +23 -4
  18. package/example-web/react2/src/components/EggsComponent.tsx +39 -44
  19. package/example-web/react2/src/components/EnchantsComponent.tsx +43 -34
  20. package/example-web/react2/src/components/FishingRodsComponent.tsx +23 -30
  21. package/example-web/react2/src/components/Footer.tsx +80 -16
  22. package/example-web/react2/src/components/FruitsComponent.tsx +18 -25
  23. package/example-web/react2/src/components/GenericFetchComponent.tsx +31 -21
  24. package/example-web/react2/src/components/GuildBattlesComponent.tsx +86 -65
  25. package/example-web/react2/src/components/HomePage.tsx +3 -1
  26. package/example-web/react2/src/components/HoverboardsComponent.tsx +100 -36
  27. package/example-web/react2/src/components/LootboxesComponent.tsx +8 -15
  28. package/example-web/react2/src/components/MasteryComponent.tsx +17 -24
  29. package/example-web/react2/src/components/MerchantsComponent.tsx +16 -23
  30. package/example-web/react2/src/components/MiscItemsComponent.tsx +32 -25
  31. package/example-web/react2/src/components/PetsComponent.tsx +74 -44
  32. package/example-web/react2/src/components/PotionsComponent.tsx +37 -36
  33. package/example-web/react2/src/components/RandomEventsComponent.tsx +30 -35
  34. package/example-web/react2/src/components/RanksComponent.tsx +58 -67
  35. package/example-web/react2/src/components/RarityComponent.tsx +7 -14
  36. package/example-web/react2/src/components/RebirthsComponent.tsx +20 -26
  37. package/example-web/react2/src/components/SecretRoomsComponent.tsx +6 -13
  38. package/example-web/react2/src/components/SeedsComponent.tsx +15 -22
  39. package/example-web/react2/src/components/ShovelsComponent.tsx +9 -16
  40. package/example-web/react2/src/components/SprinklersComponent.tsx +11 -18
  41. package/example-web/react2/src/components/UltimatesComponent.tsx +17 -24
  42. package/example-web/react2/src/components/UpgradesComponent.tsx +49 -54
  43. package/example-web/react2/src/components/WateringCansComponent.tsx +15 -19
  44. package/example-web/react2/src/components/WorldsComponent.tsx +16 -23
  45. package/example-web/react2/src/components/XPPotionsComponent.tsx +12 -19
  46. package/example-web/react2/src/components/ZoneFlagsComponent.tsx +15 -22
  47. package/example-web/react2/src/components/ZonesComponent.tsx +69 -69
  48. package/package.json +1 -1
  49. package/src/responses/collection/achievement.ts +2 -0
  50. package/src/responses/collection/guild-battle.ts +2 -4
  51. package/src/responses/collection/rank.ts +1 -0
  52. package/src/responses/collection/seed.ts +1 -0
  53. package/src/responses/exists.ts +2 -0
@@ -1,75 +1,96 @@
1
1
  import React from "react";
2
- import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
2
+ import { CollectionConfigData, GuildBattlePlacementReward, GuildBattleRewardItem } from "ps99-api";
3
+ import DynamicCollectionConfigData from "./DynamicCollectionConfigData";
4
+ import PetsComponent from "./PetsComponent";
5
+
6
+ const rewardTypes = ["Clan Gift", "Booth", "Hoverboard", "Pet"];
4
7
 
5
8
  const GuildBattlesComponent: React.FC<{
6
- configData?: CollectionConfigData<"GuildBattles">;
9
+ configData: CollectionConfigData<"GuildBattles">;
7
10
  }> = ({ configData }) => {
11
+ const renderRewardComponent = (reward: GuildBattlePlacementReward | GuildBattleRewardItem, index: number) => {
12
+ const rewardType = rewardTypes[index % rewardTypes.length];
13
+
14
+ let id: string;
15
+ let pt: number | undefined;
16
+
17
+ if ("Item" in reward) { // GuildBattlePlacementReward
18
+ id = reward.Item._data.id;
19
+ pt = reward.Item._data.pt;
20
+ } else { // GuildBattleRewardItem
21
+ id = reward._data.id;
22
+ }
23
+
24
+ if (id.startsWith("Huge")) {
25
+ return (
26
+ <DynamicCollectionConfigData
27
+ collectionName="Pets"
28
+ configName={id}
29
+ render={(configData: CollectionConfigData<"Pets">) => <PetsComponent configData={configData} displayType="specific" pt={pt} />}
30
+ />
31
+ );
32
+ } else if (id.startsWith("Exclusive Egg")) {
33
+ return <DynamicCollectionConfigData collectionName="Eggs" configName={id} />;
34
+ }
35
+
36
+ switch (rewardType) {
37
+ case "Clan Gift":
38
+ return <DynamicCollectionConfigData collectionName="Lootboxes" configName="Clan Gift" />;
39
+ case "Booth":
40
+ return <DynamicCollectionConfigData collectionName="Booths" configName={`Booth | ${id}`} />;
41
+ case "Hoverboard":
42
+ return <DynamicCollectionConfigData collectionName="Hoverboards" configName={`Hoverboard | ${id}`} />;
43
+ default:
44
+ return <p><strong>Item ID:</strong> {id}</p>;
45
+ }
46
+ };
47
+
8
48
  return (
9
- <GenericFetchComponent<CollectionConfigData<"GuildBattles">>
10
- collectionName="GuildBattles"
11
- configData={configData}
12
- render={(data) => (
13
- <div>
14
- <h2>{data.Title}</h2>
15
- <p>Start Time: {new Date(data.StartTime * 1000).toLocaleString()}</p>
16
- <p>
17
- Finish Time: {new Date(data.FinishTime * 1000).toLocaleString()}
18
- </p>
19
- {data.HasGoals && <p>Has Goals: Yes</p>}
20
- <h3>Placement Rewards:</h3>
21
- <ul>
22
- {data.PlacementRewards?.map((reward, index) => (
23
- <li key={index}>
24
- <p>Item ID: {reward.Item._data.id}</p>
25
- {reward.Item._data.pt && <p>Points: {reward.Item._data.pt}</p>}
26
- <p>Best: {reward.Best}</p>
27
- <p>Worst: {reward.Worst}</p>
28
- </li>
29
- ))}
30
- </ul>
31
- <h3>Rewards:</h3>
32
- <div>
33
- <h4>Gold:</h4>
34
- <ul>
35
- {data.Rewards.Gold.map((reward, index) => (
36
- <li key={index}>
37
- <p>Item ID: {reward._data.id}</p>
38
- </li>
39
- ))}
40
- </ul>
41
- <h4>Silver:</h4>
42
- <ul>
43
- {data.Rewards.Silver.map((reward, index) => (
44
- <li key={index}>
45
- <p>Item ID: {reward._data.id}</p>
46
- </li>
47
- ))}
48
- </ul>
49
- <h4>Bronze:</h4>
50
- <ul>
51
- {data.Rewards.Bronze.map((reward, index) => (
52
- <li key={index}>
53
- <p>Item ID: {reward._data.id}</p>
54
- </li>
49
+ <div style={{ padding: "1em", border: "1px solid #ccc", borderRadius: "8px", marginBottom: "2em" }}>
50
+ <h2 style={{ borderBottom: "2px solid #ccc", paddingBottom: "0.5em" }}>{configData.Title}</h2>
51
+ <p><strong>Start Time:</strong> {new Date(configData.StartTime * 1000).toLocaleString()}</p>
52
+ <p><strong>Finish Time:</strong> {new Date(configData.FinishTime * 1000).toLocaleString()}</p>
53
+ {configData.HasGoals && <p><strong>Has Goals:</strong> Yes</p>}
54
+
55
+ <h3>Placement Rewards:</h3>
56
+ <div style={{ display: 'flex', flexWrap: 'wrap', gap: '1em' }}>
57
+ {configData.PlacementRewards?.map((reward, index) => (
58
+ <div key={index} style={{
59
+ border: '1px solid #ccc',
60
+ borderRadius: '8px',
61
+ padding: '1em',
62
+ flex: '1 1 calc(33% - 1em)',
63
+ boxSizing: 'border-box',
64
+ }}>
65
+ {renderRewardComponent(reward, index)}
66
+ <p><strong>Best:</strong> {reward.Best}</p>
67
+ <p><strong>Worst:</strong> {reward.Worst}</p>
68
+ </div>
69
+ ))}
70
+ </div>
71
+
72
+ <h3>Rewards:</h3>
73
+ {["Gold", "Silver", "Bronze", "Good"].map(tier => (
74
+ configData.Rewards[tier]?.length > 0 && (
75
+ <div key={tier}>
76
+ <h4>{tier}</h4>
77
+ <div style={{ display: 'flex', flexWrap: 'wrap', gap: '1em' }}>
78
+ {configData.Rewards[tier].map((reward, index) => (
79
+ <div key={index} style={{
80
+ border: '1px solid #ccc',
81
+ borderRadius: '8px',
82
+ padding: '1em',
83
+ flex: '1 1 calc(33% - 1em)',
84
+ boxSizing: 'border-box',
85
+ }}>
86
+ {renderRewardComponent(reward, index)}
87
+ </div>
55
88
  ))}
56
- </ul>
57
- {data.Rewards.Good && (
58
- <div>
59
- <h4>Good:</h4>
60
- <ul>
61
- {data.Rewards.Good.map((reward, index) => (
62
- <li key={index}>
63
- <p>Item ID: {reward._data.id}</p>
64
- </li>
65
- ))}
66
- </ul>
67
- </div>
68
- )}
89
+ </div>
69
90
  </div>
70
- </div>
71
- )}
72
- />
91
+ )
92
+ ))}
93
+ </div>
73
94
  );
74
95
  };
75
96
 
@@ -5,7 +5,9 @@ const HomePage: React.FC = () => {
5
5
  return (
6
6
  <div style={{ textAlign: "center", padding: "2em" }}>
7
7
  <h1>Welcome to Pet Simulator 99 API</h1>
8
- <p>Your one-stop solution for accessing all Pet Simulator 99 data.</p>
8
+ <p>
9
+ Your one-stop solution for accessing all Pet Simulator 99 configData.
10
+ </p>
9
11
  <p>Select a collection to get started:</p>
10
12
  <Link
11
13
  to="/collections"
@@ -1,46 +1,110 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const HoverboardsComponent: React.FC<{
7
- configData?: CollectionConfigData<"Hoverboards">;
6
+ configData: CollectionConfigData<"Hoverboards">;
8
7
  }> = ({ configData }) => {
9
8
  return (
10
- <GenericFetchComponent<CollectionConfigData<"Hoverboards">>
11
- collectionName="Hoverboards"
12
- configData={configData}
13
- render={(data) => (
14
- <div>
15
- <h2>{data.DisplayName}</h2>
16
- <ImageComponent src={data.Icon} alt={data.DisplayName} />
17
- <p>Description: {data.Desc}</p>
18
- <p>Rarity: {data.Rarity.DisplayName}</p>
19
- <p>Rarity Number: {data.Rarity.RarityNumber}</p>
20
- {data.Tradable && <p>Tradable: Yes</p>}
21
- {data.CanBeShiny && <p>Can Be Shiny: Yes</p>}
22
- {data.HoverHeight && <p>Hover Height: {data.HoverHeight}</p>}
23
- {data.RotationLimit && <p>Rotation Limit: {data.RotationLimit}</p>}
24
- {data.ProductId && <p>Product ID: {data.ProductId}</p>}
25
- {data.Animation && <p>Animation: {data.Animation}</p>}
26
- {data.BobRate && <p>Bob Rate: {data.BobRate}</p>}
27
- {data.PitchScale && <p>Pitch Scale: {data.PitchScale}</p>}
28
- {data.MaxRoll && <p>Max Roll: {data.MaxRoll}</p>}
29
- {data.DefaultJumpSpeedBoost && (
30
- <p>Default Jump Speed Boost: {data.DefaultJumpSpeedBoost}</p>
31
- )}
32
- {data.IdleVolumeSpeedScale && (
33
- <p>Idle Volume Speed Scale: {data.IdleVolumeSpeedScale}</p>
34
- )}
35
- {data.IdlePitchScale && (
36
- <p>Idle Pitch Scale: {data.IdlePitchScale}</p>
37
- )}
38
- {data.BlockcastScale && <p>Blockcast Scale: {data.BlockcastScale}</p>}
39
- {data.SkateMode && <p>Skate Mode: Yes</p>}
40
- {data.IdleVolume && <p>Idle Volume: {data.IdleVolume}</p>}
41
- </div>
42
- )}
43
- />
9
+ <div
10
+ style={{
11
+ padding: "1em",
12
+ border: "1px solid #ccc",
13
+ borderRadius: "8px",
14
+ backgroundColor: "#f9f9f9",
15
+ }}
16
+ >
17
+ <h2 style={{ borderBottom: "2px solid #ccc", paddingBottom: "0.5em" }}>
18
+ {configData.DisplayName}
19
+ </h2>
20
+ <ImageComponent src={configData.Icon} alt={configData.DisplayName} />
21
+ <p>
22
+ <strong>Description:</strong> {configData.Desc}
23
+ </p>
24
+ <p>
25
+ <strong>Rarity:</strong> {configData.Rarity.DisplayName}
26
+ </p>
27
+ <p>
28
+ <strong>Rarity Number:</strong> {configData.Rarity.RarityNumber}
29
+ </p>
30
+ {configData.Tradable && (
31
+ <p>
32
+ <strong>Tradable:</strong> Yes
33
+ </p>
34
+ )}
35
+ {configData.CanBeShiny && (
36
+ <p>
37
+ <strong>Can Be Shiny:</strong> Yes
38
+ </p>
39
+ )}
40
+ {configData.HoverHeight && (
41
+ <p>
42
+ <strong>Hover Height:</strong> {configData.HoverHeight}
43
+ </p>
44
+ )}
45
+ {configData.RotationLimit && (
46
+ <p>
47
+ <strong>Rotation Limit:</strong> {configData.RotationLimit}
48
+ </p>
49
+ )}
50
+ {configData.ProductId && (
51
+ <p>
52
+ <strong>Product ID:</strong> {configData.ProductId}
53
+ </p>
54
+ )}
55
+ {configData.Animation && (
56
+ <p>
57
+ <strong>Animation:</strong> {configData.Animation}
58
+ </p>
59
+ )}
60
+ {configData.BobRate && (
61
+ <p>
62
+ <strong>Bob Rate:</strong> {configData.BobRate}
63
+ </p>
64
+ )}
65
+ {configData.PitchScale && (
66
+ <p>
67
+ <strong>Pitch Scale:</strong> {configData.PitchScale}
68
+ </p>
69
+ )}
70
+ {configData.MaxRoll && (
71
+ <p>
72
+ <strong>Max Roll:</strong> {configData.MaxRoll}
73
+ </p>
74
+ )}
75
+ {configData.DefaultJumpSpeedBoost && (
76
+ <p>
77
+ <strong>Default Jump Speed Boost:</strong>{" "}
78
+ {configData.DefaultJumpSpeedBoost}
79
+ </p>
80
+ )}
81
+ {configData.IdleVolumeSpeedScale && (
82
+ <p>
83
+ <strong>Idle Volume Speed Scale:</strong>{" "}
84
+ {configData.IdleVolumeSpeedScale}
85
+ </p>
86
+ )}
87
+ {configData.IdlePitchScale && (
88
+ <p>
89
+ <strong>Idle Pitch Scale:</strong> {configData.IdlePitchScale}
90
+ </p>
91
+ )}
92
+ {configData.BlockcastScale && (
93
+ <p>
94
+ <strong>Blockcast Scale:</strong> {configData.BlockcastScale}
95
+ </p>
96
+ )}
97
+ {configData.SkateMode && (
98
+ <p>
99
+ <strong>Skate Mode:</strong> Yes
100
+ </p>
101
+ )}
102
+ {configData.IdleVolume && (
103
+ <p>
104
+ <strong>Idle Volume:</strong> {configData.IdleVolume}
105
+ </p>
106
+ )}
107
+ </div>
44
108
  );
45
109
  };
46
110
 
@@ -1,25 +1,18 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const LootboxesComponent: React.FC<{
7
- configData?: CollectionConfigData<"Lootboxes">;
6
+ configData: CollectionConfigData<"Lootboxes">;
8
7
  }> = ({ configData }) => {
9
8
  return (
10
- <GenericFetchComponent<CollectionConfigData<"Lootboxes">>
11
- collectionName="Lootboxes"
12
- configData={configData}
13
- render={(data) => (
14
- <div>
15
- <h2>{data.DisplayName}</h2>
16
- <ImageComponent src={data.Icon} alt={data.DisplayName} />
17
- <p>Description: {data.Desc}</p>
18
- <p>Rarity: {data.Rarity.DisplayName}</p>
19
- <p>Rarity Number: {data.Rarity.RarityNumber}</p>
20
- </div>
21
- )}
22
- />
9
+ <div>
10
+ <h2>{configData.DisplayName}</h2>
11
+ <ImageComponent src={configData.Icon} alt={configData.DisplayName} />
12
+ <p>Description: {configData.Desc}</p>
13
+ <p>Rarity: {configData.Rarity.DisplayName}</p>
14
+ <p>Rarity Number: {configData.Rarity.RarityNumber}</p>
15
+ </div>
23
16
  );
24
17
  };
25
18
 
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const MasteryComponent: React.FC<{
7
- configData?: CollectionConfigData<"Mastery">;
6
+ configData: CollectionConfigData<"Mastery">;
8
7
  }> = ({ configData }) => {
9
8
  const renderPerks = (perks: any) => {
10
9
  return Object.entries(perks).map(
@@ -25,31 +24,25 @@ const MasteryComponent: React.FC<{
25
24
  };
26
25
 
27
26
  return (
28
- <GenericFetchComponent<CollectionConfigData<"Mastery">>
29
- collectionName="Mastery"
30
- configData={configData}
31
- render={(data) => (
27
+ <div>
28
+ <h2>{configData.Name}</h2>
29
+ <ImageComponent src={configData.Icon} alt={configData.Name} />
30
+ <p>Description: {configData.Desc}</p>
31
+ {configData.ToggleablePerks && (
32
32
  <div>
33
- <h2>{data.Name}</h2>
34
- <ImageComponent src={data.Icon} alt={data.Name} />
35
- <p>Description: {data.Desc}</p>
36
- {data.ToggleablePerks && (
37
- <div>
38
- <h3>Toggleable Perks</h3>
39
- {Object.entries(data.ToggleablePerks).map(([perk, value]) => (
40
- <p key={perk}>
41
- {perk}: {value ? "Enabled" : "Disabled"}
42
- </p>
43
- ))}
44
- </div>
45
- )}
46
- <div>
47
- <h3>Perks</h3>
48
- {renderPerks(data.Perks)}
49
- </div>
33
+ <h3>Toggleable Perks</h3>
34
+ {Object.entries(configData.ToggleablePerks).map(([perk, value]) => (
35
+ <p key={perk}>
36
+ {perk}: {value ? "Enabled" : "Disabled"}
37
+ </p>
38
+ ))}
50
39
  </div>
51
40
  )}
52
- />
41
+ <div>
42
+ <h3>Perks</h3>
43
+ {renderPerks(configData.Perks)}
44
+ </div>
45
+ </div>
53
46
  );
54
47
  };
55
48
 
@@ -1,9 +1,8 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
 
5
- const MerchantComponent: React.FC<{
6
- configData?: CollectionConfigData<"Merchants">;
4
+ const MerchantsComponent: React.FC<{
5
+ configData: CollectionConfigData<"Merchants">;
7
6
  }> = ({ configData }) => {
8
7
  const renderStockRange = (stockRange: number[][] | undefined) => {
9
8
  if (!stockRange) return null;
@@ -17,29 +16,23 @@ const MerchantComponent: React.FC<{
17
16
  };
18
17
 
19
18
  return (
20
- <GenericFetchComponent<CollectionConfigData<"Merchants">>
21
- collectionName="Merchants"
22
- configData={configData}
23
- render={(data) => (
19
+ <div>
20
+ <h2>{configData.DisplayName}</h2>
21
+ <p>Price Multiplier: {configData.PriceMult}</p>
22
+ <p>Machine Name: {configData.MachineName}</p>
23
+ <p>Refresh Rate: {configData.RefreshRate} seconds</p>
24
+ {configData.HideNotification && <p>Notification: Hidden</p>}
25
+ {configData.HideRespect && <p>Respect: Hidden</p>}
26
+ {configData.IsStatic && <p>Static Merchant</p>}
27
+ {renderStockRange(configData.StockRangeByRespectLevel)}
28
+ {configData.SlotRespectLevels && (
24
29
  <div>
25
- <h2>{data.DisplayName}</h2>
26
- <p>Price Multiplier: {data.PriceMult}</p>
27
- <p>Machine Name: {data.MachineName}</p>
28
- <p>Refresh Rate: {data.RefreshRate} seconds</p>
29
- {data.HideNotification && <p>Notification: Hidden</p>}
30
- {data.HideRespect && <p>Respect: Hidden</p>}
31
- {data.IsStatic && <p>Static Merchant</p>}
32
- {renderStockRange(data.StockRangeByRespectLevel)}
33
- {data.SlotRespectLevels && (
34
- <div>
35
- <h3>Slot Respect Levels</h3>
36
- <p>{data.SlotRespectLevels.join(", ")}</p>
37
- </div>
38
- )}
30
+ <h3>Slot Respect Levels</h3>
31
+ <p>{configData.SlotRespectLevels.join(", ")}</p>
39
32
  </div>
40
33
  )}
41
- />
34
+ </div>
42
35
  );
43
36
  };
44
37
 
45
- export default MerchantComponent;
38
+ export default MerchantsComponent;
@@ -1,36 +1,43 @@
1
1
  import React from "react";
2
2
  import { CollectionConfigData } from "ps99-api";
3
- import { GenericFetchComponent } from "./GenericFetchComponent";
4
3
  import ImageComponent from "./ImageComponent";
5
4
 
6
5
  const MiscItemsComponent: React.FC<{
7
- configData?: CollectionConfigData<"MiscItems">;
6
+ configData: CollectionConfigData<"MiscItems">;
8
7
  }> = ({ configData }) => {
9
8
  return (
10
- <GenericFetchComponent<CollectionConfigData<"MiscItems">>
11
- collectionName="MiscItems"
12
- configData={configData}
13
- render={(data) => (
14
- <div>
15
- <h2>{data.DisplayName}</h2>
16
- <p>Category: {data.Category}</p>
17
- <ImageComponent src={data.Icon} alt={data.DisplayName} />
18
- {data.AltIcon && (
19
- <ImageComponent
20
- src={data.AltIcon}
21
- alt={`${data.DisplayName} (Alternate)`}
22
- />
23
- )}
24
- <p>Description: {data.Desc}</p>
25
- <p>
26
- Rarity: {data.Rarity.DisplayName} (Rarity Number:{" "}
27
- {data.Rarity.RarityNumber})
28
- </p>
29
- {data.Tradable && <p>Tradable: Yes</p>}
30
- {!data.Tradable && <p>Tradable: No</p>}
31
- </div>
9
+ <div
10
+ style={{
11
+ padding: "1em",
12
+ border: "1px solid #ccc",
13
+ borderRadius: "8px",
14
+ backgroundColor: "#f9f9f9",
15
+ }}
16
+ >
17
+ <h2 style={{ borderBottom: "2px solid #ccc", paddingBottom: "0.5em" }}>
18
+ {configData.DisplayName}
19
+ </h2>
20
+ <p>
21
+ <strong>Category:</strong> {configData.Category}
22
+ </p>
23
+ <ImageComponent src={configData.Icon} alt={configData.DisplayName} />
24
+ {configData.AltIcon && (
25
+ <ImageComponent
26
+ src={configData.AltIcon}
27
+ alt={`${configData.DisplayName} (Alternate)`}
28
+ />
32
29
  )}
33
- />
30
+ <p>
31
+ <strong>Description:</strong> {configData.Desc}
32
+ </p>
33
+ <p>
34
+ <strong>Rarity:</strong> {configData.Rarity.DisplayName} (Rarity Number:{" "}
35
+ {configData.Rarity.RarityNumber})
36
+ </p>
37
+ <p>
38
+ <strong>Tradable:</strong> {configData.Tradable ? "Yes" : "No"}
39
+ </p>
40
+ </div>
34
41
  );
35
42
  };
36
43