2
0

🐛 (usage) Fix storage limit check

This commit is contained in:
Baptiste Arnaud
2022-09-21 08:00:25 +02:00
committed by Baptiste Arnaud
parent 1063429275
commit 1e26703ad4
6 changed files with 14 additions and 7 deletions

View File

@ -26,10 +26,7 @@ export const ErrorPage = ({ error }: { error: Error }) => {
</h2>
</>
) : (
<>
<h1 style={{ fontWeight: 'bold', fontSize: '30px' }}>{error.name}</h1>
<h2>{error.message}</h2>
</>
<p style={{ fontSize: '24px' }}>{error.message}</p>
)}
</div>
)

View File

@ -100,7 +100,7 @@ export const TypebotPage = ({
const handleNewAnswer = async (
answer: Answer & { uploadedFiles: boolean }
) => {
if (!resultId) return setError(new Error('Result was not created'))
if (!resultId) return setError(new Error('Error: result was not created'))
const { error } = await upsertAnswer({ ...answer, resultId })
if (error) setError(error)
if (chatStarted) return
@ -110,7 +110,7 @@ export const TypebotPage = ({
}
const handleCompleted = async () => {
if (!resultId) return setError(new Error('Result was not created'))
if (!resultId) return setError(new Error('Error: result was not created'))
const { error } = await updateResult(resultId, { isCompleted: true })
if (error) setError(error)
}