Fix:auto redirect

This commit is contained in:
Shreyaschorge 2025-07-11 20:51:12 +05:30
parent c7583b2ffe
commit 5724c92b88
No known key found for this signature in database
2 changed files with 71 additions and 74 deletions

View File

@ -118,9 +118,9 @@ export function AuthDialog({
const content = getStepContent();
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm">
<div className="bg-white dark:bg-gray-800 rounded-xl p-6 max-w-md mx-4 shadow-2xl border border-gray-200 dark:border-gray-700">
<div className="flex justify-between items-center mb-4">
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm p-4">
<div className="bg-white dark:bg-gray-800 rounded-xl w-full max-w-md shadow-2xl border border-gray-200 dark:border-gray-700 max-h-[80vh] sm:max-h-[90vh] flex flex-col">
<div className="flex justify-between items-center p-4 sm:p-6 pb-3 sm:pb-4 border-b border-gray-200 dark:border-gray-700 flex-shrink-0">
<h2 className="text-lg font-semibold text-gray-900 dark:text-gray-100">
{isError ? 'Error' : content.title}
</h2>
@ -144,6 +144,7 @@ export function AuthDialog({
</button>
</div>
<div className="flex-1 overflow-y-auto p-4 sm:p-6 pt-3 sm:pt-4 min-h-0">
{isError ? (
<div className="text-center">
<div className="text-red-600 dark:text-red-400 mb-4">
@ -213,5 +214,6 @@ export function AuthDialog({
)}
</div>
</div>
</div>
);
}

View File

@ -378,7 +378,7 @@ export function NeynarAuthButton() {
}
// For backend flow, the session will be handled by NextAuth
},
[useBackendFlow]
[useBackendFlow, fetchUserData]
);
// Error callback
@ -538,12 +538,7 @@ export function NeynarAuthButton() {
setDialogStep('signin');
setShowDialog(true);
frontendSignIn();
// Open mobile app if on mobile and URL is available
if (url && isMobile()) {
window.open(url, '_blank');
}
}, [isError, reconnect, frontendSignIn, url]);
}, [isError, reconnect, frontendSignIn]);
const handleSignOut = useCallback(async () => {
try {