Skip to content

Commit df8ba62

Browse files
committed
feat: conditionally render the countdown component based on edition?.showCountdown property.
1 parent 6ecb5ff commit df8ba62

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

src/2025/Home/components/Home/Home.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,17 +104,19 @@ const Home: FC<React.PropsWithChildren<unknown>> = () => {
104104
La Farga, Hospitalet, Barcelona
105105
</StyledSubtitle>
106106
</StyledTitleContainer>
107-
<motion.div
108-
initial={{ opacity: 0, scale: 0.9 }}
109-
animate={{ opacity: 1, scale: 1 }}
110-
transition={{ duration: 0.8, delay: 1.8 }}
111-
>
112-
<Countdown
113-
date={edition?.startDay}
114-
onComplete={CountDownCompleted}
115-
renderer={TimeCountDown}
116-
/>
117-
</motion.div>
107+
{edition?.showCountdown && (
108+
<motion.div
109+
initial={{ opacity: 0, scale: 0.9 }}
110+
animate={{ opacity: 1, scale: 1 }}
111+
transition={{ duration: 0.8, delay: 1.8 }}
112+
>
113+
<Countdown
114+
date={edition?.startDay}
115+
onComplete={CountDownCompleted}
116+
renderer={TimeCountDown}
117+
/>
118+
</motion.div>
119+
)}
118120
{edition?.actionButtons && (
119121
<ActionButtons
120122
isTicketsDisabled={isTicketsDisabled}

0 commit comments

Comments
 (0)