Increase char limit to 10k for answers. Preserve line breaks.

This commit is contained in:
James Grugett 2022-02-17 00:30:46 -06:00
parent f161661e7e
commit f1d3ac8189
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ export const createAnswer = functions.runWith({ minInstances: 1 }).https.onCall(
if (amount <= 0 || isNaN(amount) || !isFinite(amount))
return { status: 'error', message: 'Invalid amount' }
if (!text || typeof text !== 'string' || text.length > 1000)
if (!text || typeof text !== 'string' || text.length > 10000)
return { status: 'error', message: 'Invalid text' }
// Run as transaction to prevent race conditions.

View File

@ -126,7 +126,7 @@ function AnswerItem(props: {
)}
>
<Col className="gap-3 flex-1">
<div>{text}</div>
<div className="whitespace-pre-line break-words">{text}</div>
<Row className="text-gray-500 text-sm gap-2 items-center">
<SiteLink className="relative" href={`/${username}`}>