From 8a98f4c53dfac45c487675d48fd3f862b23d5247 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 13 Jun 2024 10:53:22 -0300 Subject: [PATCH] refactor: Update InputListComponent to fix button behavior Fix the button behavior in the InputListComponent to correctly handle the index comparison. Previously, the button was only rendered for the first element in the list, but now it is rendered for the last element. This change ensures consistent rendering and improves the user experience when interacting with the component. --- src/frontend/src/components/inputListComponent/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/components/inputListComponent/index.tsx b/src/frontend/src/components/inputListComponent/index.tsx index ce55ff1d4..7b5f87274 100644 --- a/src/frontend/src/components/inputListComponent/index.tsx +++ b/src/frontend/src/components/inputListComponent/index.tsx @@ -31,7 +31,7 @@ export default function InputListComponent({
1 && editNode ? "my-1" : "", - "flex flex-col gap-3" + "flex flex-col gap-3", )} > {value.map((singleValue, idx) => { @@ -53,7 +53,7 @@ export default function InputListComponent({ idx } /> - {idx === value.length - 1 ? ( + {idx === 0 ? (