diff --git a/packages/surveys/src/components/wrappers/StackedCardsContainer.tsx b/packages/surveys/src/components/wrappers/StackedCardsContainer.tsx
index efb6b41e68..9d3eeb9422 100644
--- a/packages/surveys/src/components/wrappers/StackedCardsContainer.tsx
+++ b/packages/surveys/src/components/wrappers/StackedCardsContainer.tsx
@@ -128,34 +128,41 @@ export const StackedCardsContainer = ({
}}
onMouseLeave={() => setHovered(false)}>
- {cardArrangement === "simple"
- ? getCardContent(questionIdx, 0)
- : questionIdx !== undefined &&
- cardIndexes.map((_, idx) => {
- const index = survey.welcomeCard.enabled ? idx - 1 : idx;
- const offset = index - questionIdx;
- const isHidden = offset < 0;
- return (
-
(cardRefs.current[index] = el)}
- id={`questionCard-${index}`}
- key={index}
- style={{
- zIndex: 1000 - index,
- transform: `${calculateCardTransform(offset)}`,
- opacity: isHidden ? 0 : (100 - 30 * offset) / 100,
- height: getCardHeight(offset),
- transitionDuration: "600ms",
- pointerEvents: offset === 0 ? "auto" : "none",
- ...borderStyles,
- ...straightCardArrangementStyles(offset),
- ...getBottomStyles(),
- }}
- className="pointer rounded-custom bg-survey-bg absolute inset-x-0 backdrop-blur-md transition-all ease-in-out">
- {getCardContent(index, offset)}
-
- );
- })}
+ {cardArrangement === "simple" ? (
+
+ {getCardContent(questionIdx, 0)}
+
+ ) : (
+ questionIdx !== undefined &&
+ cardIndexes.map((_, idx) => {
+ const index = survey.welcomeCard.enabled ? idx - 1 : idx;
+ const offset = index - questionIdx;
+ const isHidden = offset < 0;
+ return (
+
(cardRefs.current[index] = el)}
+ id={`questionCard-${index}`}
+ key={index}
+ style={{
+ zIndex: 1000 - index,
+ transform: `${calculateCardTransform(offset)}`,
+ opacity: isHidden ? 0 : (100 - 30 * offset) / 100,
+ height: getCardHeight(offset),
+ transitionDuration: "600ms",
+ pointerEvents: offset === 0 ? "auto" : "none",
+ ...borderStyles,
+ ...straightCardArrangementStyles(offset),
+ ...getBottomStyles(),
+ }}
+ className="pointer rounded-custom bg-survey-bg absolute inset-x-0 backdrop-blur-md transition-all ease-in-out">
+ {getCardContent(index, offset)}
+
+ );
+ })
+ )}