@rpg-engine/long-bow 0.5.0 → 0.5.2
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/dist/long-bow.cjs.development.js +3 -2
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +3 -2
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/Item/Cards/ItemInfo.tsx +11 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@rollup/plugin-image": "^2.1.1",
|
|
86
|
-
"@rpg-engine/shared": "^0.8.
|
|
86
|
+
"@rpg-engine/shared": "^0.8.68",
|
|
87
87
|
"dayjs": "^1.11.2",
|
|
88
88
|
"font-awesome": "^4.7.0",
|
|
89
89
|
"fs-extra": "^10.1.0",
|
|
@@ -34,7 +34,7 @@ export const ItemInfo: React.FC<IItemInfoProps> = ({
|
|
|
34
34
|
atlasJSON,
|
|
35
35
|
}) => {
|
|
36
36
|
const renderStatistics = () => {
|
|
37
|
-
const statistics = [];
|
|
37
|
+
const statistics: React.ReactNode[] = [];
|
|
38
38
|
|
|
39
39
|
for (const stat of statisticsToDisplay) {
|
|
40
40
|
const itemStatistic = item[stat.key];
|
|
@@ -76,7 +76,7 @@ export const ItemInfo: React.FC<IItemInfoProps> = ({
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
const renderMissingStatistic = () => {
|
|
79
|
-
const statistics = [];
|
|
79
|
+
const statistics: React.ReactNode[] = [];
|
|
80
80
|
|
|
81
81
|
for (const stat of statisticsToDisplay) {
|
|
82
82
|
const itemToCompareStatistic = itemToCompare?.[stat.key];
|
|
@@ -127,6 +127,8 @@ export const ItemInfo: React.FC<IItemInfoProps> = ({
|
|
|
127
127
|
));
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
const skillName = item.minRequirements?.skill?.name;
|
|
131
|
+
|
|
130
132
|
return (
|
|
131
133
|
<Container item={item}>
|
|
132
134
|
<Header>
|
|
@@ -143,13 +145,13 @@ export const ItemInfo: React.FC<IItemInfoProps> = ({
|
|
|
143
145
|
{item.minRequirements && (
|
|
144
146
|
<LevelRequirement>
|
|
145
147
|
<div className="title">Requirements:</div>
|
|
146
|
-
<div>- Level: {item.minRequirements
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
item.minRequirements
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
<div>- Level: {item.minRequirements?.level}</div>
|
|
149
|
+
{skillName && (
|
|
150
|
+
<div>
|
|
151
|
+
- {skillName.charAt(0).toUpperCase() + skillName.slice(1)}:{' '}
|
|
152
|
+
{item.minRequirements?.skill?.level}
|
|
153
|
+
</div>
|
|
154
|
+
)}
|
|
153
155
|
</LevelRequirement>
|
|
154
156
|
)}
|
|
155
157
|
|