Skip to content

Commit b882e29

Browse files
committed
[TOOL-3430] SDK: Fix ConnectEmbed showing a flash of Sign In prompt screen even if user is already signed in (#6262)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on improving the user experience in the `ConnectEmbed` component by addressing the display of a "Sign In" prompt when the login status is uncertain. Instead, it shows a loading indicator during this period. ### Detailed summary - Updated the condition for rendering the loading screen in `SignatureScreen.tsx`. - The loading screen is now shown if either `wallet` is not available or `siweAuth.isLoading` is true, enhancing user feedback during the login process. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 9ad1d3c commit b882e29

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/warm-eggs-relate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Fix ConnectEmbed briefly showing "Sign In" prompt while the login status is not known - show loading indicator instead

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/SignatureScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const SignatureScreen: React.FC<{
6969
}
7070
}, [onDone, siweAuth]);
7171

72-
if (!wallet) {
72+
if (!wallet || siweAuth.isLoading) {
7373
return <LoadingScreen data-testid="loading-screen" />;
7474
}
7575

0 commit comments

Comments
 (0)