added loading in transfer ownership CTA

This commit is contained in:
Piyush Gupta
2023-08-06 15:46:11 +05:30
parent 37afd004af
commit 205593d8d3
2 changed files with 5 additions and 1 deletions

View File

@@ -160,6 +160,7 @@ function RoleElement({
setOpen={setTransferOwnershipModalOpen}
memberName={memberName}
onSubmit={handleOwnershipTransfer}
isLoading={loading}
/>
</>
);

View File

@@ -7,6 +7,7 @@ interface TransferOwnershipModalProps {
setOpen: Dispatch<SetStateAction<boolean>>;
memberName: string;
onSubmit: () => void;
isLoading?: boolean;
}
export default function TransferOwnershipModal({
@@ -14,6 +15,7 @@ export default function TransferOwnershipModal({
open,
memberName,
onSubmit,
isLoading,
}: TransferOwnershipModalProps) {
const [inputValue, setInputValue] = useState("");
@@ -29,7 +31,8 @@ export default function TransferOwnershipModal({
okBtnText="Transfer ownership"
title="There can only be ONE owner! Are you sure?"
cancelBtnText="CANCEL"
disabled={inputValue !== memberName}>
disabled={inputValue !== memberName}
isLoading={isLoading}>
<div className="py-5">
<ul className="list-disc pb-6 pl-6">
<li>