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