feat: ability to change the order of signers in create screen #61
@ -168,7 +168,13 @@ export const CreatePage = () => {
|
|||||||
setUsers((prev) => prev.filter((user) => user.pubkey !== pubkey))
|
setUsers((prev) => prev.filter((user) => user.pubkey !== pubkey))
|
||||||
}
|
}
|
||||||
|
|
||||||
const moveSinger = (dragIndex: number, hoverIndex: number) => {
|
/**
|
||||||
s marked this conversation as resolved
Outdated
|
|||||||
|
* 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) => {
|
setUsers((prevUsers) => {
|
||||||
const updatedUsers = [...prevUsers]
|
const updatedUsers = [...prevUsers]
|
||||||
const [draggedUser] = updatedUsers.splice(dragIndex, 1)
|
const [draggedUser] = updatedUsers.splice(dragIndex, 1)
|
||||||
@ -448,7 +454,7 @@ export const CreatePage = () => {
|
|||||||
users={users}
|
users={users}
|
||||||
handleUserRoleChange={handleUserRoleChange}
|
handleUserRoleChange={handleUserRoleChange}
|
||||||
handleRemoveUser={handleRemoveUser}
|
handleRemoveUser={handleRemoveUser}
|
||||||
moveSigner={moveSinger}
|
moveSigner={moveSigner}
|
||||||
/>
|
/>
|
||||||
<Box sx={{ mt: 1, display: 'flex', justifyContent: 'center' }}>
|
<Box sx={{ mt: 1, display: 'flex', justifyContent: 'center' }}>
|
||||||
<Button onClick={handleCreate} variant="contained">
|
<Button onClick={handleCreate} variant="contained">
|
||||||
|
Loading…
Reference in New Issue
Block a user
is singer a typo?