mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-06-14 04:01:01 +00:00
debug: add visible auth debug banner
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pezkuwi-telegram-miniapp",
|
||||
"version": "1.0.139",
|
||||
"version": "1.0.141",
|
||||
"type": "module",
|
||||
"description": "Pezkuwichain Telegram Mini App - Forum, Announcements, Rewards",
|
||||
"author": "Pezkuwichain Team",
|
||||
|
||||
@@ -14,11 +14,19 @@ import { useAuth } from '@/contexts/AuthContext';
|
||||
|
||||
export function AnnouncementsSection() {
|
||||
const { hapticImpact, hapticNotification, openLink } = useTelegram();
|
||||
const { isAuthenticated, sessionToken } = useAuth();
|
||||
const { isAuthenticated, sessionToken, user, authError } = useAuth();
|
||||
|
||||
const { data: announcements, isLoading, refetch, isRefetching } = useAnnouncements();
|
||||
const reactionMutation = useAnnouncementReaction(sessionToken);
|
||||
|
||||
// Debug: Log auth state
|
||||
console.log('[Announcements] Auth state:', {
|
||||
isAuthenticated,
|
||||
hasSessionToken: !!sessionToken,
|
||||
user: user?.first_name,
|
||||
authError,
|
||||
});
|
||||
|
||||
const handleReaction = (id: string, reaction: 'like' | 'dislike') => {
|
||||
if (!isAuthenticated) {
|
||||
hapticNotification('error');
|
||||
@@ -66,6 +74,12 @@ export function AnnouncementsSection() {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* Debug Banner - Remove after fixing */}
|
||||
<div className="bg-yellow-500/20 text-yellow-300 text-xs p-2 mx-4 mt-2 rounded">
|
||||
Auth: {isAuthenticated ? 'YES' : 'NO'} | Token: {sessionToken ? 'YES' : 'NO'} | User:{' '}
|
||||
{user?.first_name || 'null'} | Error: {authError || 'none'}
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
<div className="flex-1 overflow-y-auto hide-scrollbar">
|
||||
{isLoading ? (
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.0.139",
|
||||
"buildTime": "2026-02-07T00:36:05.724Z",
|
||||
"buildNumber": 1770424565725
|
||||
"version": "1.0.141",
|
||||
"buildTime": "2026-02-07T00:37:25.080Z",
|
||||
"buildNumber": 1770424645081
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user