Yuki Takei 3 лет назад
Родитель
Сommit
f179dd7be1
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      packages/presentation/src/components/Presentation.tsx

+ 5 - 0
packages/presentation/src/components/Presentation.tsx

@@ -14,6 +14,7 @@ import styles from './Presentation.module.scss';
 
 
 const baseRevealOptions: Reveal.Options = {
 const baseRevealOptions: Reveal.Options = {
   disableLayout: true,
   disableLayout: true,
+  slideNumber: 'c/t',
 };
 };
 
 
 type Props = {
 type Props = {
@@ -31,6 +32,10 @@ export const Presentation = (props: Props): JSX.Element => {
       deck.initialize()
       deck.initialize()
         .then(() => deck.slide(0)); // navigate to the first slide
         .then(() => deck.slide(0)); // navigate to the first slide
     }
     }
+
+    return function cleanup() {
+      Reveal?.destroy?.();
+    };
   }, [children, revealOptions]);
   }, [children, revealOptions]);
 
 
   return (
   return (