only displaying the new paywall component for project owners (#23586)

GitOrigin-RevId: f30c5abd2db361742a1a35d5147ac83345fe44a8
This commit is contained in:
Davinder Singh
2025-02-13 13:28:15 +00:00
committed by Copybot
parent b837f017f5
commit 73c76ae056

View File

@@ -27,6 +27,7 @@ function PdfLogsViewer({ alwaysVisible = false }: { alwaysVisible?: boolean }) {
validationIssues,
showLogs,
stoppedOnFirstError,
isProjectOwner,
} = useCompileContext()
const { loadingError } = usePdfPreviewContext()
@@ -37,6 +38,9 @@ function PdfLogsViewer({ alwaysVisible = false }: { alwaysVisible?: boolean }) {
'ol-isPaywallChangeCompileTimeoutEnabled'
)
const isCompileTimeoutPaywallDisplay =
isProjectOwner && isPaywallChangeCompileTimeoutEnabled
return (
<div
className={classnames('logs-pane', {
@@ -51,7 +55,7 @@ function PdfLogsViewer({ alwaysVisible = false }: { alwaysVisible?: boolean }) {
{loadingError && <PdfPreviewError error="pdf-viewer-loading-error" />}
{hasShortCompileTimeout && error === 'timedout' ? (
isPaywallChangeCompileTimeoutEnabled ? (
isCompileTimeoutPaywallDisplay ? (
<TimeoutUpgradePaywallPrompt />
) : (
<TimeoutUpgradePromptNew />