Shun Miyazawa 3 лет назад
Родитель
Сommit
5535acf523

+ 0 - 19
packages/app/src/components/ReactMarkdownComponents/Table.tsx

@@ -1,19 +0,0 @@
-import React from 'react';
-
-type TableProps = {
-  children: React.ReactNode,
-  className?: string
-  'data-line': number
-}
-
-export const Table = React.memo((props: TableProps): JSX.Element => {
-
-  const { children, className } = props;
-
-  return (
-    <table className={`${className}`} data-line={props['data-line']}>
-      {children}
-    </table>
-  );
-});
-Table.displayName = 'Table';

+ 0 - 4
packages/app/src/services/renderer/renderer.tsx

@@ -27,7 +27,6 @@ import { CodeBlock } from '~/components/ReactMarkdownComponents/CodeBlock';
 import { DrawioViewerWithEditButton } from '~/components/ReactMarkdownComponents/DrawioViewerWithEditButton';
 import { Header } from '~/components/ReactMarkdownComponents/Header';
 import { NextLink } from '~/components/ReactMarkdownComponents/NextLink';
-import { Table } from '~/components/ReactMarkdownComponents/Table';
 import { TableWithEditButton } from '~/components/ReactMarkdownComponents/TableWithEditButton';
 import { RehypeSanitizeOption } from '~/interfaces/rehype';
 import type { RendererConfig } from '~/interfaces/services/renderer';
@@ -295,7 +294,6 @@ export const generateSimpleViewOptions = (
   if (components != null) {
     components.lsx = LsxImmutable;
     components.drawio = drawioPlugin.DrawioViewer;
-    components.table = Table;
   }
 
   if (config.isEnabledXssPrevention) {
@@ -361,7 +359,6 @@ export const generateSSRViewOptions = (
   // add components
   if (components != null) {
     components.lsx = LsxImmutable;
-    components.table = Table;
   }
 
   if (config.isEnabledXssPrevention) {
@@ -413,7 +410,6 @@ export const generatePreviewOptions = (config: RendererConfig, pagePath: string)
   if (components != null) {
     components.lsx = LsxImmutable;
     components.drawio = drawioPlugin.DrawioViewer;
-    components.table = Table;
   }
 
   if (config.isEnabledXssPrevention) {