diff --git a/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/index.tsx b/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/index.tsx
index 2d6710524a3f8..6f0a0e1e22f6a 100644
--- a/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/index.tsx
+++ b/packages/next/src/client/components/react-dev-overlay/internal/container/RuntimeError/index.tsx
@@ -33,30 +33,18 @@ export function RuntimeError({ error }: RuntimeErrorProps) {
}
}, [error.frames])
- const [all, setAll] = React.useState(firstFrame == null)
-
- const {
- canShowMore,
- leadingFramesGroupedByFramework,
- stackFramesGroupedByFramework,
- } = React.useMemo(() => {
- const leadingFrames = allLeadingFrames.filter((f) => f.expanded || all)
- const visibleCallStackFrames = allCallStackFrames.filter(
- (f) => f.expanded || all
- )
-
- return {
- canShowMore:
- allCallStackFrames.length !== visibleCallStackFrames.length ||
- (all && firstFrame != null),
-
- stackFramesGroupedByFramework:
- groupStackFramesByFramework(allCallStackFrames),
-
- leadingFramesGroupedByFramework:
- groupStackFramesByFramework(leadingFrames),
- }
- }, [all, allCallStackFrames, allLeadingFrames, firstFrame])
+ const { leadingFramesGroupedByFramework, stackFramesGroupedByFramework } =
+ React.useMemo(() => {
+ const leadingFrames = allLeadingFrames.filter((f) => f.expanded)
+
+ return {
+ stackFramesGroupedByFramework:
+ groupStackFramesByFramework(allCallStackFrames),
+
+ leadingFramesGroupedByFramework:
+ groupStackFramesByFramework(leadingFrames),
+ }
+ }, [allCallStackFrames, allLeadingFrames])
return (
@@ -82,32 +70,11 @@ export function RuntimeError({ error }: RuntimeErrorProps) {
/>
) : undefined}
- {canShowMore ? (
-
-
-
- ) : undefined}
)
}
export const styles = css`
- button[data-nextjs-data-runtime-error-collapsed-action] {
- background: none;
- border: none;
- padding: 0;
- font-size: var(--size-font-small);
- line-height: var(--size-font-bigger);
- color: var(--color-accents-3);
- }
-
[data-nextjs-call-stack-frame]:not(:last-child),
[data-nextjs-component-stack-frame]:not(:last-child) {
margin-bottom: var(--size-gap-double);