From 598e60be7e803c9787db427c971a23c9ff0f0063 Mon Sep 17 00:00:00 2001 From: Daniel Woelfel Date: Tue, 10 Mar 2026 15:14:19 -0700 Subject: [PATCH 1/4] Fix login modal --- src/app/components.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/components.tsx b/src/app/components.tsx index 39d7ca9..0fd007f 100644 --- a/src/app/components.tsx +++ b/src/app/components.tsx @@ -2,6 +2,7 @@ import { db } from '@/lib/db'; import { useCallback, useEffect, useRef, useState } from 'react'; +import { createPortal } from 'react-dom'; import Link from 'next/link'; import { useTheme } from './ThemeProvider'; import { useRouter } from 'next/navigation'; @@ -2543,7 +2544,11 @@ export function UpvoteButton({ if (compact) { return ( <> - {showLogin && setShowLogin(false)} />} + {showLogin && + createPortal( + setShowLogin(false)} />, + document.body, + )} + {/* Mode toggle */}
- {[15, 30, 60].map((d, i) => ( + {(['time', 'ink'] as const).map((mode, i) => ( ))}
+ {/* Budget picker */} +
+ {budgetMode === 'time' + ? [15, 30, 60].map((d, i) => ( + + )) + : [3000, 6000, 12000].map((b, i) => ( + + ))} +
+ {budgetMode === 'ink' && } {remixLoading ? 'Loading remix...' : 'Draw to start!'} @@ -610,11 +681,15 @@ function DrawCanvas({ )} - + {budgetMode === 'ink' ? ( + + ) : ( + + )} @@ -659,8 +734,18 @@ function DrawCanvas({ )}
diff --git a/src/instant.schema.ts b/src/instant.schema.ts index 7c8f961..cec97cc 100644 --- a/src/instant.schema.ts +++ b/src/instant.schema.ts @@ -28,6 +28,7 @@ const _schema = i.schema({ trimEnd: i.number().optional(), flagged: i.boolean().optional(), score: i.number().indexed().optional(), + inkBudget: i.number().optional(), }), votes: i.entity({ createdAt: i.number().indexed(),