Skip to content

Commit 46455d2

Browse files
EightRiceclaude
andcommitted
debug: Add console logging to trace HTML stripping issue
- Log raw API response in useSinglePoll hook - Shows description length, HTML tag presence, and first 100 chars - Will help identify where HTML is being stripped in deploy preview 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 469847c commit 46455d2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/modules/lite/explorer/hooks/usePoll.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ export const useSinglePoll = (pollId: string | undefined, id?: any, community?:
2929
return
3030
}
3131

32+
// DEBUG: Log raw API response
33+
console.log("🔍 RAW API RESPONSE for pollId:", pollId)
34+
console.log("Description length from API:", record.description?.length || 0)
35+
console.log("Description first 100 chars:", record.description?.substring(0, 100))
36+
console.log("Has HTML tags:", record.description?.includes("<"))
37+
console.log("Full record:", JSON.stringify(record, null, 2))
38+
3239
record.timeFormatted = isProposalActive(Number(record.endTime))
3340
record.isActive =
3441
record.timeFormatted && !record.timeFormatted.includes("ago")
@@ -47,8 +54,10 @@ export const useSinglePoll = (pollId: string | undefined, id?: any, community?:
4754
return
4855
}
4956
}
50-
fetchPoll()
57+
if (pollId) {
58+
fetchPoll()
59+
}
5160
return
52-
}, [id, community])
61+
}, [id, community, pollId, openNotification])
5362
return poll
5463
}

0 commit comments

Comments
 (0)