I can see the issue - when the planLength input is cleared or invalid, it becomes NaN, which causes the error. The same issue can happen with hoursPerDay. Let me fix this by ensuring these values always have valid defaults:
I've fixed the NaN error by adding validation in the onChange handlers for both hoursPerDay and planLength inputs. Now when the input is cleared or contains an invalid value, it defaults to safe minimum values (0.5 for hours per day and 1 for plan length) instead of NaN. This prevents React from receiving NaN as a value attribute while maintaining smooth user input.
I can see the issue - on line 63, the code tries to call plan.plan.filter(), but when the component first renders or if the plan data isn't structured correctly, plan.plan might be undefined. Let me fix this by adding proper null checks:
I've fixed the filter error by adding null checks before calling .filter() on plan.plan. Now the code safely handles cases where the plan data might be undefined or not yet loaded, using optional chaining (?.) and providing default values (empty array [] and 0) to prevent crashes.
make it so that it actually develops a plan and updates the 5 windows at the very bottom of the screen, add this image as the logo, make the plan it makes for the user look like the image example, where it lists what they should study that day and how many practice problems they should do. Also if it is a bigger topic, when you make the study plan for them, break it down into smaller topics and spread those out over the study days)
You can send messages while the preview loads