Skip to content

🎥 Make videos programmatically with React

dont show switcher when isRendering

umungobungo93bd2342d21b
diff --git a/packages/docs/src/remotion/HomepageVideo/cards/Cards.tsx b/packages/docs/src/remotion/HomepageVideo/cards/Cards.tsx
index 584f732b0f..5f39c6de8e 100644
--- a/packages/docs/src/remotion/HomepageVideo/cards/Cards.tsx
+++ b/packages/docs/src/remotion/HomepageVideo/cards/Cards.tsx
@@ -5,7 +5,7 @@ import React, {
useRef,
useState,
} from 'react';
-import {AbsoluteFill} from 'remotion';
+import {AbsoluteFill, getRemotionEnvironment} from 'remotion';
import type {Trending} from '../Comp';
import {CurrentCountry} from '../CurrentCountry';
import {Temperature} from '../Temperature';
@@ -53,6 +53,7 @@ export const Cards: React.FC<{
const positions = useRef(getInitialPositions());
const shouldBePositions = useRef(getInitialPositions());
+ const {isRendering} = getRemotionEnvironment();
useEffect(() => {
const {current} = container;
@@ -149,7 +150,7 @@ export const Cards: React.FC<{
shouldBePositions={shouldBePositions}
indices={indices}
theme={theme}
- withSwitcher={index === 3}
+ withSwitcher={index === 3 && !isRendering}
onLeft={onLeft}
onRight={onRight}
/>