@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.
@@ -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;