diff --git a/components/Button.tsx b/components/Button.tsx index da9dcfc..e7f206d 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -25,7 +25,7 @@ export const Button = (props: ButtonProps) => { 'bg-plumbus hover:bg-plumbus-light rounded ': variant === 'solid', 'bg-plumbus hover:bg-plumbus-light rounded border border-plumbus-dark': variant === 'outline', 'opacity-50 cursor-not-allowed pointer-events-none': isDisabled, - 'animate-pulse cursor-wait pointer-events-none': isLoading, + 'pl-2 animate-pulse cursor-wait pointer-events-none': isLoading, }, className, )} diff --git a/pages/collections/create.tsx b/pages/collections/create.tsx index ee9c6ff..3f2d610 100644 --- a/pages/collections/create.tsx +++ b/pages/collections/create.tsx @@ -49,6 +49,7 @@ const CollectionCreationPage: NextPage = () => { const [royaltyDetails, setRoyaltyDetails] = useState(null) const [uploading, setUploading] = useState(false) + const [creatingCollection, setCreatingCollection] = useState(false) const [readyToCreate, setReadyToCreate] = useState(false) const [minterContractAddress, setMinterContractAddress] = useState(null) const [sg721ContractAddress, setSg721ContractAddress] = useState(null) @@ -74,6 +75,7 @@ const CollectionCreationPage: NextPage = () => { const createCollection = async () => { try { + setCreatingCollection(true) setBaseTokenUri(null) setCoverImageUrl(null) setMinterContractAddress(null) @@ -113,9 +115,11 @@ const CollectionCreationPage: NextPage = () => { await instantiate(baseTokenUri as string, coverImageUrl as string, whitelist) } + setCreatingCollection(false) // eslint-disable-next-line @typescript-eslint/no-explicit-any } catch (error: any) { toast.error(error.message) + setCreatingCollection(false) setUploading(false) } } @@ -443,9 +447,9 @@ const CollectionCreationPage: NextPage = () => { {readyToCreate && }
-