fix type error

connect-component
Ryukemeister 2023-10-03 14:23:21 +05:30
parent af741a1b9e
commit c3be4f0167
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ export function ConnectButton({ buttonText, onButtonClick }: ConnectButtonProps
const [isProcessing, setIsProcessing] = useState<boolean>(false); const [isProcessing, setIsProcessing] = useState<boolean>(false);
const [errMsg, setErrMsg] = useState<string>(""); const [errMsg, setErrMsg] = useState<string>("");
function handleSubmit(e: Event) { function handleSubmit(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) {
e.preventDefault(); e.preventDefault();
setIsProcessing(true); setIsProcessing(true);
@ -31,10 +31,10 @@ export function ConnectButton({ buttonText, onButtonClick }: ConnectButtonProps
return ( return (
<div> <div>
<button onClick={(event) => handleSubmit(event)} disabled={!isProcessing} type="button"> <button className="" onClick={(event) => handleSubmit(event)} disabled={!isProcessing} type="button">
{buttonText || "Install App"} {buttonText || "Install App"}
</button> </button>
{!!errMsg ? <span>{errMsg}</span> : null} {!!errMsg && <span>{errMsg}</span>}
</div> </div>
); );
} }