🔧 chore: first index to be '1' for Steps

This commit is contained in:
Andre H 2024-03-04 11:52:31 +08:00
parent 0aeea36dbd
commit f5296e9b8d
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ export const Step = ({
const renderConnector = useCallback( const renderConnector = useCallback(
(index: number) => { (index: number) => {
if (index === 0) { if (index === 1) {
return null; return null;
} }
@ -49,7 +49,7 @@ export const Step = ({
{completed ? ( {completed ? (
<CheckRoundFilledIcon className="w-full h-full" /> <CheckRoundFilledIcon className="w-full h-full" />
) : ( ) : (
index + 1 index
)} )}
</div> </div>
} }

View File

@ -33,7 +33,7 @@ export const Steps = ({
{...step} {...step}
orientation={orientation} orientation={orientation}
currentIndex={currentIndex} currentIndex={currentIndex}
index={i} index={i + 1}
/> />
</Fragment> </Fragment>
))} ))}