Skip to content

Commit

Permalink
fix: should not render div on lesser error count
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Jan 2, 2025
1 parent 3b8b07a commit 5e0f6b4
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@ export function ErrorOverlayBottomStacks({
}: ErrorOverlayBottomStacksProps) {
return (
<div className="error-overlay-bottom-stacks-wrapper">
<div
className={`error-overlay-bottom-stack-1 ${
errorsCount - activeIdx >= 2 ? '' : 'stack-slide-up'
}`}
aria-hidden="true"
/>
{errorsCount > 1 && (
<div
className={`error-overlay-bottom-stack-1 ${
errorsCount - activeIdx >= 2 ? '' : 'stack-slide-up'
}`}
aria-hidden="true"
/>
)}

<div
className={`error-overlay-bottom-stack-2 ${
errorsCount - activeIdx >= 3 ? '' : 'stack-slide-up'
}`}
aria-hidden="true"
/>
{errorsCount > 2 && (
<div
className={`error-overlay-bottom-stack-2 ${
errorsCount - activeIdx >= 3 ? '' : 'stack-slide-up'
}`}
aria-hidden="true"
/>
)}
</div>
)
}
Expand Down

0 comments on commit 5e0f6b4

Please sign in to comment.