debug: add retry auth button and increase wait time to 5s

This commit is contained in:
2026-02-07 05:40:20 +03:00
parent 5382579f9f
commit 4674e06251
5 changed files with 42 additions and 12 deletions
+17 -1
View File
@@ -14,7 +14,14 @@ import { useAuth } from '@/contexts/AuthContext';
export function AnnouncementsSection() {
const { hapticImpact, hapticNotification, openLink } = useTelegram();
const { isAuthenticated, sessionToken, user, authError } = useAuth();
const {
isAuthenticated,
sessionToken,
user,
authError,
signIn,
isLoading: authLoading,
} = useAuth();
const { data: announcements, isLoading, refetch, isRefetching } = useAnnouncements();
const reactionMutation = useAnnouncementReaction(sessionToken);
@@ -91,6 +98,15 @@ export function AnnouncementsSection() {
Platform: {window.Telegram?.WebApp?.platform || 'unknown'} | Ver:{' '}
{window.Telegram?.WebApp?.version || '?'}
</div>
{!isAuthenticated && (
<button
onClick={() => signIn()}
disabled={authLoading}
className="mt-2 px-3 py-1 bg-yellow-500 text-black rounded text-xs font-medium"
>
{authLoading ? 'Deneniyor...' : 'Retry Auth'}
</button>
)}
</div>
{/* Content */}