Merge pull request #28253 from overleaf/dp-compile-timeout-paywall-changes

Fix compile timeout logic for a different user's project

GitOrigin-RevId: cae5b5f31473d30c7db2533eb4c6ef11e8f21047
This commit is contained in:
David
2025-09-05 08:05:00 +00:00
committed by Copybot
parent 9cdd5cee25
commit a1310c188f
@@ -10,6 +10,7 @@ import {
import GeneralErrorState from './general-error-state'
import RenderingErrorExpectedState from './rendering-error-expected-state'
import RenderingErrorState from './rendering-error-state'
import getMeta from '@/utils/meta'
// AvailableStates
// - rendering-error-expected
@@ -30,7 +31,9 @@ import RenderingErrorState from './rendering-error-state'
function PdfErrorState() {
const { loadingError } = usePdfPreviewContext()
// TODO ide-redesign-cleanup: rename showLogs to something else and check usages
const { hasShortCompileTimeout, error, showLogs } = useCompileContext()
const { error, showLogs } = useCompileContext()
const { compileTimeout } = getMeta('ol-compileSettings')
const newEditor = useIsNewEditorEnabled()
const { t } = useTranslation()
@@ -40,7 +43,7 @@ function PdfErrorState() {
switch (error) {
case 'timedout': {
if (hasShortCompileTimeout) {
if (compileTimeout < 60) {
return <ShortCompileTimeoutErrorState />
} else {
return <LongCompileTimeoutErrorState />