From 9bc73b63a3fb55f8663ded5e9615ecea82d4b0cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=87=E8=96=87=E5=AE=89?= Date: Wed, 21 Jan 2026 13:19:10 +0800 Subject: [PATCH] a --- frontend/src/components/AccountSelector.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/AccountSelector.jsx b/frontend/src/components/AccountSelector.jsx index 4b464ad..3d9c76f 100644 --- a/frontend/src/components/AccountSelector.jsx +++ b/frontend/src/components/AccountSelector.jsx @@ -33,12 +33,14 @@ const AccountSelector = ({ onChanged }) => { return acc }, []) + const optionsKey = options.map((x) => x.id).join(',') + useEffect(() => { if (!options.length) return if (options.some((a) => a.id === accountId)) return setAccountId(options[0].id) // eslint-disable-next-line react-hooks/exhaustive-deps - }, [options.length]) + }, [optionsKey, accountId]) return (