mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-28 05:33:10 +08:00
Add key prop to UsageScriptModal to ensure component remounts when switching between different providers. This fixes issue #569 where configuring usage query for one provider would incorrectly apply the same configuration to all providers. The root cause was that useState initialization only runs on first mount, and due to useLastValidValue hook keeping the modal rendered during close animation, the component might not fully unmount when switching providers rapidly. Closes #569