@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.
@@ -32147,6 +32147,12 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
32147
32147
  var _useState3 = React.useState(initialSkillPointsToNextLevel || shared.getSPForLevel(initialLevel + 1)),
32148
32148
  skillPointsToNextLevel = _useState3[0],
32149
32149
  setSkillPointsToNextLevel = _useState3[1];
32150
+ // Update skill points and level from props when they change
32151
+ React.useEffect(function () {
32152
+ setLevel(initialLevel);
32153
+ setSkillPoints(initialSkillPoints);
32154
+ setSkillPointsToNextLevel(initialSkillPointsToNextLevel || shared.getSPForLevel(initialLevel + 1));
32155
+ }, [initialLevel, initialSkillPoints, initialSkillPointsToNextLevel]);
32150
32156
  React.useEffect(function () {
32151
32157
  if (skillPoints >= skillPointsToNextLevel) {
32152
32158
  var excessSkillPoints = skillPoints - skillPointsToNextLevel;