Skip to content

Commit 52e69f3

Browse files
committed
fix(clerk-js): add loading state with spinner in SignUp component for Solana wallet selection
Signed-off-by: Kenton Duprey <[email protected]>
1 parent c6deea6 commit 52e69f3

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

packages/clerk-js/src/ui/components/SignUp/SignUpStartSolanaWalletsCard.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useClerk } from '@clerk/shared/react';
22
import { lazy, Suspense } from 'react';
33

44
import { withRedirectToAfterSignUp, withRedirectToSignUpTask } from '@/ui/common/withRedirect';
5-
import { descriptors, Flex, Flow, localizationKeys } from '@/ui/customizables';
5+
import { descriptors, Flex, Flow, localizationKeys, Spinner } from '@/ui/customizables';
66
import { BackLink } from '@/ui/elements/BackLink';
77
import { Card } from '@/ui/elements/Card';
88
import { useCardState, withCardStateProvider } from '@/ui/elements/contexts';
@@ -41,7 +41,25 @@ const SignUpStartSolanaWalletsCardInner = () => {
4141
direction='col'
4242
gap={4}
4343
>
44-
<Suspense fallback={null}>
44+
<Suspense
45+
fallback={
46+
<Flex
47+
direction={'row'}
48+
align={'center'}
49+
justify={'center'}
50+
sx={t => ({
51+
height: '100%',
52+
minHeight: t.sizes.$32,
53+
})}
54+
>
55+
<Spinner
56+
size={'lg'}
57+
colorScheme={'primary'}
58+
elementDescriptor={descriptors.spinner}
59+
/>
60+
</Flex>
61+
}
62+
>
4563
<Web3WalletButtons
4664
web3AuthCallback={({ walletName }) => {
4765
return clerk

0 commit comments

Comments
 (0)