From 012dfe4618a588d9a364c6a6b6461216349dfdca Mon Sep 17 00:00:00 2001 From: Carlos Andres Perez Ubeda Date: Fri, 10 Jan 2025 13:54:51 -0600 Subject: [PATCH] fix: correct carousel index update on profile selection - Updated `handleCarouselClick` in `finance-quick-transfer.tsx` to use `setCurrentIndex` instead of `carousel.setCurrentIndex`. - This ensures the selected profile updates the carousel index correctly upon user interaction. --- src/sections/finance/components/finance-quick-transfer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sections/finance/components/finance-quick-transfer.tsx b/src/sections/finance/components/finance-quick-transfer.tsx index 9f07985e..85c2cb02 100644 --- a/src/sections/finance/components/finance-quick-transfer.tsx +++ b/src/sections/finance/components/finance-quick-transfer.tsx @@ -242,7 +242,8 @@ export default function FinanceQuickTransfer({ // Handle onClick for carousel items const handleCarouselClick = (index: number) => { - carousel.setCurrentIndex(index); + // When user clicks on a profile, set the currentIndex to that index in the carousel + setCurrentIndex(index); }; // If the stored address changes or if we typed a valid custom address, check if it exists in the carousel