From 5e0f6b4a599ade260710fa2db3c666d08e981290 Mon Sep 17 00:00:00 2001 From: devjiwonchoi Date: Fri, 3 Jan 2025 03:27:41 +0900 Subject: [PATCH] fix: should not render div on lesser error count --- .../error-overlay-bottom-stacks.tsx | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/Errors/error-overlay-bottom-stacks/error-overlay-bottom-stacks.tsx b/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/Errors/error-overlay-bottom-stacks/error-overlay-bottom-stacks.tsx index 9988c26f3238b..7ce5ab5ba4368 100644 --- a/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/Errors/error-overlay-bottom-stacks/error-overlay-bottom-stacks.tsx +++ b/packages/next/src/client/components/react-dev-overlay/_experimental/internal/components/Errors/error-overlay-bottom-stacks/error-overlay-bottom-stacks.tsx @@ -11,19 +11,23 @@ export function ErrorOverlayBottomStacks({ }: ErrorOverlayBottomStacksProps) { return (
-
= 2 ? '' : 'stack-slide-up' - }`} - aria-hidden="true" - /> + {errorsCount > 1 && ( +
= 2 ? '' : 'stack-slide-up' + }`} + aria-hidden="true" + /> + )} -
= 3 ? '' : 'stack-slide-up' - }`} - aria-hidden="true" - /> + {errorsCount > 2 && ( +
= 3 ? '' : 'stack-slide-up' + }`} + aria-hidden="true" + /> + )}
) }