mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 01:25:33 +08:00
c9a4938866
Fix state synchronization in useBaseUrlState and useApiKeyState hooks to properly clear values when config is reset. Previously, when switching from a preset to "custom", the baseUrl and apiKey states would retain their old values because the sync logic only updated when new values existed, not when they were cleared. Changes: - useBaseUrlState: Always sync baseUrl to config value (empty if undefined) - useApiKeyState: Remove hasApiKeyField check that prevented clearing