From e0b1b4a17270a18a18c47833ddea1db89ab0292f Mon Sep 17 00:00:00 2001 From: SwiftHawk Date: Mon, 20 May 2024 12:19:53 +0500 Subject: [PATCH] chore fix type --- src/pages/create/index.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pages/create/index.tsx b/src/pages/create/index.tsx index 6b7a2a3..619a9f0 100644 --- a/src/pages/create/index.tsx +++ b/src/pages/create/index.tsx @@ -168,7 +168,13 @@ export const CreatePage = () => { setUsers((prev) => prev.filter((user) => user.pubkey !== pubkey)) } - const moveSinger = (dragIndex: number, hoverIndex: number) => { + /** + * changes the position of signer in the signers list + * + * @param dragIndex represents the current position of user + * @param hoverIndex represents the target position of user + */ + const moveSigner = (dragIndex: number, hoverIndex: number) => { setUsers((prevUsers) => { const updatedUsers = [...prevUsers] const [draggedUser] = updatedUsers.splice(dragIndex, 1) @@ -448,7 +454,7 @@ export const CreatePage = () => { users={users} handleUserRoleChange={handleUserRoleChange} handleRemoveUser={handleRemoveUser} - moveSigner={moveSinger} + moveSigner={moveSigner} />