Skip to content

Commit

Permalink
Login button polish
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoferlund committed Aug 24, 2023
1 parent e8a95d1 commit 33b55e6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/frontend/src/components/auth/SignMessageButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useSignMessage } from 'wagmi';
import { LoaderSpinner } from '@/components/ui/LoaderSpinner';
import { Button } from '../ui/Button';
import { faPrayingHands } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';

interface Props {
text: string;
Expand All @@ -26,7 +27,10 @@ const SignMessageButton = ({
});

return isLoading || isSuccess ? (
<LoaderSpinner />
<Button disabled>
<FontAwesomeIcon icon={faPrayingHands} spin className="w-4 mr-2" />
Signing in...
</Button>
) : (
<Button onClick={(): void => signMessage()}>{text}</Button>
);
Expand Down

0 comments on commit 33b55e6

Please sign in to comment.