Просмотр исходного кода

fix code to use marp presentation

reiji-h 1 год назад
Родитель
Сommit
092f4c0d52

+ 1 - 3
apps/app/src/components/PagePresentationModal.tsx

@@ -1,6 +1,5 @@
 import React, { useCallback } from 'react';
 
-import type { PresentationProps } from '@growi/presentation';
 import { LoadingSpinner } from '@growi/ui/dist/components';
 import { useFullScreen } from '@growi/ui/dist/utils';
 import dynamic from 'next/dynamic';
@@ -15,11 +14,10 @@ import { useSWRxCurrentPage } from '~/stores/page';
 import { usePresentationViewOptions } from '~/stores/renderer';
 import { useNextThemes } from '~/stores/use-next-themes';
 
-
 import styles from './PagePresentationModal.module.scss';
 
 
-const Presentation = dynamic<PresentationProps>(() => import('./Presentation/Presentation').then(mod => mod.Presentation), {
+const Presentation = dynamic(() => import('./Presentation/Presentation').then(mod => mod.Presentation), {
   ssr: false,
   loading: () => (
     <LoadingSpinner className="text-muted fs-1" />

+ 3 - 3
apps/app/src/components/Presentation/Presentation.tsx

@@ -1,12 +1,12 @@
-import { Presentation as PresentationSubstance, type PresentationProps } from '@growi/presentation';
+import { Presentation as PresentationSubstance, type PresentationProps as PresentationPropsSubstance } from '@growi/presentation';
 
 import { parseSlideFrontmatterInMarkdown } from '../Page/markdown-slide-util-for-view';
 
 import '@growi/presentation/dist/style.css';
 
-type Props = {
+type Props = Omit<PresentationPropsSubstance, 'hasMarpFlag'> & {
   isEnabledMarp: boolean
-} & PresentationProps;
+};
 
 export const Presentation = (props: Props): JSX.Element => {
   const { options, isEnabledMarp, children } = props;

+ 0 - 1
packages/presentation/src/index.ts

@@ -1,3 +1,2 @@
 export * from './components/Presentation';
 export * from './components/Slides';
-export * from './services/parse-slide-frontmatter';