feat: stronger visual scoring differentiation + streak fix
- Exakt cards: gold glow border, gold banner, trophy emoji, larger animated badge - Tendency: green accent (was blue), clearer differentiation from Exakt - Falsch: muted gray, reduced opacity — clearly "lost" - Profile tip history: solid gold/green/gray badges with distinct borders - Streak: remove utc_date <= NOW() filter so dev-finished matches count; handle PostgreSQL boolean serialization Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -53,13 +53,13 @@ router.get('/', async (req: Request, res: Response): Promise<void> => {
|
||||
`SELECT CASE WHEN t.id IS NOT NULL THEN true ELSE false END AS has_tip
|
||||
FROM matches m
|
||||
LEFT JOIN tips t ON t.match_id = m.id AND t.user_id = $1
|
||||
WHERE m.utc_date <= NOW() AND m.status IN ('FINISHED', 'IN_PLAY')
|
||||
WHERE m.status IN ('FINISHED', 'IN_PLAY')
|
||||
ORDER BY m.utc_date DESC`,
|
||||
[userId]
|
||||
);
|
||||
let streak = 0;
|
||||
for (const m of pastMatches) {
|
||||
if (m.has_tip) streak++;
|
||||
if (m.has_tip === true || (m.has_tip as unknown) === 't' || (m.has_tip as unknown) === '1') streak++;
|
||||
else break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user