From 7bb9a5721ed51a5883509713465a595dd2c18839 Mon Sep 17 00:00:00 2001 From: ahmadshaheer Date: Mon, 13 Jan 2025 14:53:11 +0430 Subject: [PATCH] feat: update account actions to set accountId in URL query on initial account load --- .../HeroSection/components/AccountActions.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountActions.tsx b/frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountActions.tsx index 155421db6c5..76d553d890c 100644 --- a/frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountActions.tsx +++ b/frontend/src/container/CloudIntegrationPage/HeroSection/components/AccountActions.tsx @@ -74,7 +74,10 @@ function AccountActions(): JSX.Element { useEffect(() => { if (initialAccount !== null) { setActiveAccount(initialAccount); + urlQuery.set('accountId', initialAccount.cloud_account_id); + navigate({ search: urlQuery.toString() }); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [initialAccount]); const [isIntegrationModalOpen, setIsIntegrationModalOpen] = useState(false);