reiji-h 2 лет назад
Родитель
Сommit
2ca90f688a
1 измененных файлов с 3 добавлено и 11 удалено
  1. 3 11
      apps/app/src/components/Page/RevisionRenderer.tsx

+ 3 - 11
apps/app/src/components/Page/RevisionRenderer.tsx

@@ -1,6 +1,6 @@
 import React, { useEffect, useState } from 'react';
 
-import { SLIDE_STYLE, presentationSlideStyle } from '@growi/presentation';
+import { presentationSlideStyle } from '@growi/presentation';
 import dynamic from 'next/dynamic';
 import { ErrorBoundary, FallbackProps } from 'react-error-boundary';
 import ReactMarkdown from 'react-markdown';
@@ -62,18 +62,10 @@ const RevisionRenderer = React.memo((props: Props): JSX.Element => {
               const [key, value] = line.split(':').map(part => part.trim());
 
               if (key === 'presentation') {
-                if (value === 'marp') {
-                  setSlideStyle(SLIDE_STYLE.marp);
-                }
-                else if (value === 'true') {
-                  setSlideStyle(SLIDE_STYLE.true);
-                }
-                else {
-                  setSlideStyle(null);
-                }
+                setSlideStyle(value === 'marp' || value === 'true' ? value : null);
               }
               else if (key === 'marp' && value === 'true') {
-                setSlideStyle(SLIDE_STYLE.marp);
+                setSlideStyle('marp');
               }
             });
           }