From b4bad2deaf93eff5858d903cd68b8fdd5a5eecd3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 26 Oct 2022 14:50:50 -0300 Subject: pretty --- packages/demobank-ui/src/components/AsyncButton.tsx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'packages/demobank-ui/src/components/AsyncButton.tsx') diff --git a/packages/demobank-ui/src/components/AsyncButton.tsx b/packages/demobank-ui/src/components/AsyncButton.tsx index 0c4305668..eec11f4a1 100644 --- a/packages/demobank-ui/src/components/AsyncButton.tsx +++ b/packages/demobank-ui/src/components/AsyncButton.tsx @@ -19,10 +19,10 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { ComponentChildren, h, VNode } from 'preact'; -import { useLayoutEffect, useRef } from 'preact/hooks'; +import { ComponentChildren, h, VNode } from "preact"; +import { useLayoutEffect, useRef } from "preact/hooks"; // import { LoadingModal } from "../modal"; -import { useAsync } from '../hooks/async'; +import { useAsync } from "../hooks/async"; // import { Translate } from "../../i18n"; type Props = { @@ -44,20 +44,16 @@ export function AsyncButton({ const buttonRef = useRef(null); useLayoutEffect(() => { - if (grabFocus) - buttonRef.current?.focus(); - + if (grabFocus) buttonRef.current?.focus(); }, [grabFocus]); // if (isSlow) { // return ; // } - if (isLoading) - return ; - + if (isLoading) return ; return ( - + -- cgit v1.2.3