From 8ff32e00e0e28d32fdf4e9ff7911fa257e448004 Mon Sep 17 00:00:00 2001 From: Nicolas Moreno Date: Mon, 13 May 2024 10:54:32 -0300 Subject: [PATCH] code review changes --- apps/web/app/components/confirmation-code-input.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/web/app/components/confirmation-code-input.tsx b/apps/web/app/components/confirmation-code-input.tsx index 49c294da..17827f43 100644 --- a/apps/web/app/components/confirmation-code-input.tsx +++ b/apps/web/app/components/confirmation-code-input.tsx @@ -12,11 +12,10 @@ export const ConfirmationCodeInput = () => { prevValue[index] = value || null return [...prevValue] }) - if (value) { - if (index < 5) setFocusedInputIndex(index + 1) - else { - // submit code if all inputs are filled - } + if (index < 5) { + value && setFocusedInputIndex(index + 1) + } else { + // submit code if all inputs are filled } }