Răsfoiți Sursa

initialize deck and navigate to the first page

Yuki Takei 3 ani în urmă
părinte
comite
332985a51c

+ 3 - 1
packages/presentation/src/components/PresentationWithReveal.tsx

@@ -22,7 +22,9 @@ export const Presentation = (props: Props): JSX.Element => {
 
   useEffect(() => {
     if (children != null) {
-      Reveal.initialize(revealOptions);
+      const deck = new Reveal(revealOptions);
+      deck.initialize()
+        .then(() => deck.slide(0)); // navigate to the first slide
     }
   }, [children, revealOptions]);