diff --git a/services/web/frontend/js/features/preview/components/preview-error.js b/services/web/frontend/js/features/preview/components/preview-error.js
index 088804e3bf..7919f795fb 100644
--- a/services/web/frontend/js/features/preview/components/preview-error.js
+++ b/services/web/frontend/js/features/preview/components/preview-error.js
@@ -8,7 +8,7 @@ import { useEditorContext } from '../../../shared/context/editor-context'
import StartFreeTrialButton from '../../../shared/components/start-free-trial-button'
function PreviewError({ name }) {
- const { isProjectOwner } = useEditorContext({
+ const { hasPremiumCompile, isProjectOwner } = useEditorContext({
isProjectOwner: PropTypes.bool,
})
const {
@@ -74,7 +74,7 @@ function PreviewError({ name }) {
entryAriaLabel={t('compile_error_entry_description')}
level="error"
/>
- {name === 'timedout' && enableSubscriptions ? (
+ {name === 'timedout' && enableSubscriptions && !hasPremiumCompile ? (
) : null}
>
diff --git a/services/web/frontend/js/shared/context/editor-context.js b/services/web/frontend/js/shared/context/editor-context.js
index 9813620f63..a4785d7fdf 100644
--- a/services/web/frontend/js/shared/context/editor-context.js
+++ b/services/web/frontend/js/shared/context/editor-context.js
@@ -19,6 +19,7 @@ EditorContext.Provider.propTypes = {
brandedMenu: PropTypes.string,
submitBtnHtml: PropTypes.string,
}),
+ hasPremiumCompile: PropTypes.bool,
loading: PropTypes.bool,
projectRootDocId: PropTypes.string,
projectId: PropTypes.string.isRequired,
@@ -66,6 +67,11 @@ export function EditorProvider({ children, ide, settings }) {
ide.$scope
)
+ const [compileGroup] = useScopeValue(
+ 'project.features.compileGroup',
+ ide.$scope
+ )
+
const [rootFolder] = useScopeValue('rootFolder', ide.$scope)
const renameProject = useCallback(
@@ -98,6 +104,7 @@ export function EditorProvider({ children, ide, settings }) {
const editorContextValue = {
cobranding,
+ hasPremiumCompile: compileGroup === 'priority',
loading,
projectId: window.project_id,
projectRootDocId,
diff --git a/services/web/frontend/stories/preview-logs-pane.stories.js b/services/web/frontend/stories/preview-logs-pane.stories.js
index b1b8e97b38..0ea3701c57 100644
--- a/services/web/frontend/stories/preview-logs-pane.stories.js
+++ b/services/web/frontend/stories/preview-logs-pane.stories.js
@@ -16,6 +16,9 @@ export const TimedOutError = args => {
owner: {
_id: window.user.id,
},
+ features: {
+ compileGroup: 'standard',
+ },
},
},
}
@@ -34,6 +37,39 @@ TimedOutError.args = {
},
}
+export const TimedOutErrorWithPriorityCompile = args => {
+ useFetchMock(fetchMock => {
+ fetchMock.post('express:/event/:key', 202)
+ })
+
+ const ide = {
+ $scope: {
+ $watch: () => () => null,
+ project: {
+ owner: {
+ _id: window.user.id,
+ },
+ features: {
+ compileGroup: 'priority',
+ },
+ },
+ },
+ }
+
+ return (
+
+
+
+
+
+ )
+}
+TimedOutErrorWithPriorityCompile.args = {
+ errors: {
+ timedout: {},
+ },
+}
+
export default {
title: 'Preview Logs / Pane',
component: PreviewLogsPane,