@rpg-engine/long-bow 0.6.48 → 0.6.49
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 +6 -0
- 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 +6 -0
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SkillProgressBar.tsx +9 -0
package/dist/long-bow.esm.js
CHANGED
|
@@ -32145,6 +32145,12 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
32145
32145
|
var _useState3 = useState(initialSkillPointsToNextLevel || getSPForLevel(initialLevel + 1)),
|
|
32146
32146
|
skillPointsToNextLevel = _useState3[0],
|
|
32147
32147
|
setSkillPointsToNextLevel = _useState3[1];
|
|
32148
|
+
// Update skill points and level from props when they change
|
|
32149
|
+
useEffect(function () {
|
|
32150
|
+
setLevel(initialLevel);
|
|
32151
|
+
setSkillPoints(initialSkillPoints);
|
|
32152
|
+
setSkillPointsToNextLevel(initialSkillPointsToNextLevel || getSPForLevel(initialLevel + 1));
|
|
32153
|
+
}, [initialLevel, initialSkillPoints, initialSkillPointsToNextLevel]);
|
|
32148
32154
|
useEffect(function () {
|
|
32149
32155
|
if (skillPoints >= skillPointsToNextLevel) {
|
|
32150
32156
|
var excessSkillPoints = skillPoints - skillPointsToNextLevel;
|