Unverified Commit fefb2be2 authored by Jude Gao's avatar Jude Gao Committed by GitHub

fix: always show indicator in app router (#74758)

When there are no errors, we show `Errors` component with `minimized`
status, which means that it should only render the indicator on the
bottom left corner of the screen. E2E tests for the new DevOverlay will
be added later.
parent 5778fd4b
...@@ -40,7 +40,6 @@ export default class ReactDevOverlay extends React.PureComponent< ...@@ -40,7 +40,6 @@ export default class ReactDevOverlay extends React.PureComponent<
const { isReactError } = this.state const { isReactError } = this.state
const hasBuildError = state.buildError != null const hasBuildError = state.buildError != null
const hasRuntimeErrors = Boolean(state.errors.length)
const hasStaticIndicator = state.staticIndicator const hasStaticIndicator = state.staticIndicator
const debugInfo = state.debugInfo const debugInfo = state.debugInfo
...@@ -69,21 +68,15 @@ export default class ReactDevOverlay extends React.PureComponent< ...@@ -69,21 +68,15 @@ export default class ReactDevOverlay extends React.PureComponent<
versionInfo={state.versionInfo} versionInfo={state.versionInfo}
/> />
) : ( ) : (
<> <Errors
{hasRuntimeErrors ? ( isTurbopackEnabled={!!process.env.TURBOPACK}
<Errors isAppDir={true}
isTurbopackEnabled={!!process.env.TURBOPACK} initialDisplayState={isReactError ? 'fullscreen' : 'minimized'}
isAppDir={true} errors={state.errors}
initialDisplayState={ versionInfo={state.versionInfo}
isReactError ? 'fullscreen' : 'minimized' hasStaticIndicator={hasStaticIndicator}
} debugInfo={debugInfo}
errors={state.errors} />
versionInfo={state.versionInfo}
hasStaticIndicator={hasStaticIndicator}
debugInfo={debugInfo}
/>
) : null}
</>
)} )}
</ShadowPortal> </ShadowPortal>
</> </>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment