fix type error
parent
af741a1b9e
commit
c3be4f0167
|
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue