i see you are a vibe coding fan.
the multiple useStates allow each component to only update once the useStates they rely on are updated. Should refactor that now while it's relatively easy to untangle. And every variable should be passed down as props to the components (not importing the state) so the re-render works effectively.