feat: Mobile optimization and UI improvements
- Add mobile hamburger menu in TopBar with slide-in panel - Optimize all components for mobile (responsive fonts, spacing, touch targets) - Add proper viewport meta tags and safe area padding - Fix /jackpot/next API to return active cycles regardless of scheduled time - Remove BTC display from jackpot pot (show sats only) - Add setup/ folder to .gitignore - Improve mobile UX: 16px inputs (no iOS zoom), 44px touch targets - Add active states for touch feedback on buttons
This commit is contained in:
@@ -65,17 +65,29 @@ export async function getNextJackpot(req: Request, res: Response) {
|
||||
|
||||
const lottery = lotteryResult.rows[0];
|
||||
|
||||
// Get next cycle
|
||||
const cycleResult = await db.query<JackpotCycle>(
|
||||
// Get next cycle - first try to find one that hasn't drawn yet
|
||||
let cycleResult = await db.query<JackpotCycle>(
|
||||
`SELECT * FROM jackpot_cycles
|
||||
WHERE lottery_id = $1
|
||||
AND status IN ('scheduled', 'sales_open')
|
||||
AND scheduled_at > NOW()
|
||||
AND status IN ('scheduled', 'sales_open', 'drawing')
|
||||
ORDER BY scheduled_at ASC
|
||||
LIMIT 1`,
|
||||
[lottery.id]
|
||||
);
|
||||
|
||||
// If no active cycles, get the next upcoming one
|
||||
if (cycleResult.rows.length === 0) {
|
||||
cycleResult = await db.query<JackpotCycle>(
|
||||
`SELECT * FROM jackpot_cycles
|
||||
WHERE lottery_id = $1
|
||||
AND status = 'scheduled'
|
||||
AND scheduled_at > NOW()
|
||||
ORDER BY scheduled_at ASC
|
||||
LIMIT 1`,
|
||||
[lottery.id]
|
||||
);
|
||||
}
|
||||
|
||||
if (cycleResult.rows.length === 0) {
|
||||
return res.status(503).json({
|
||||
version: '1.0',
|
||||
|
||||
Reference in New Issue
Block a user