tiptap: remove unused code

This commit is contained in:
fantasticit 2022-04-27 22:25:01 +08:00
parent 733a4910e9
commit 6d0a596496
5 changed files with 45 additions and 49 deletions

View File

@ -8,12 +8,12 @@
.cloneNodeWrap {
position: absolute;
background-color: rgb(179 212 255 / 30%);
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #333;
background-color: rgb(179 212 255 / 30%);
align-items: center;
justify-content: center;
user-select: none;
}

View File

@ -1,6 +1,6 @@
import { useEffect, useRef } from 'react';
import cls from 'classnames';
import { NodeViewWrapper, NodeViewContent } from '@tiptap/react';
import { NodeViewWrapper } from '@tiptap/react';
import { Button, Typography, Spin, Collapsible, Space } from '@douyinfe/semi-ui';
import { IconDownload, IconPlayCircle, IconClose } from '@douyinfe/semi-icons';
import { Tooltip } from 'components/tooltip';
@ -68,7 +68,6 @@ export const AttachmentWrapper = ({ editor, node, updateAttributes }) => {
if (url) {
return (
<>
<div className={cls(styles.wrap, visible && styles.isPreviewing, 'render-wrapper')} onClick={selectFile}>
<div>
<Space>
@ -108,7 +107,6 @@ export const AttachmentWrapper = ({ editor, node, updateAttributes }) => {
</Collapsible>
) : null}
</div>
</>
);
}

View File

@ -1,4 +1,4 @@
import { NodeViewWrapper, NodeViewContent } from '@tiptap/react';
import { NodeViewWrapper } from '@tiptap/react';
import { useMemo, useCallback, useEffect, useRef } from 'react';
import cls from 'classnames';
import { Popover, TextArea, Typography, Space } from '@douyinfe/semi-ui';

View File

@ -1,7 +1,7 @@
import { NodeViewWrapper } from '@tiptap/react';
import { Spin } from '@douyinfe/semi-ui';
export const LoadingWrapper = ({ editor, node, updateAttributes }) => {
export const LoadingWrapper = ({ editor, node }) => {
const isEditable = editor.isEditable;
const { text } = node.attrs;

View File

@ -1,4 +1,4 @@
import { NodeViewWrapper, NodeViewContent } from '@tiptap/react';
import { NodeViewWrapper } from '@tiptap/react';
import { Button, Collapsible, Space, Popover, Tag, Input } from '@douyinfe/semi-ui';
import cls from 'classnames';
import { useCallback, useEffect, useRef } from 'react';
@ -90,7 +90,6 @@ export const StatusWrapper = ({ editor, node, updateAttributes }) => {
return (
<NodeViewWrapper as="span" className={cls(styles.wrap, 'status')}>
<NodeViewContent />
{isEditable ? (
<Popover
showArrow
@ -130,7 +129,6 @@ export const StatusWrapper = ({ editor, node, updateAttributes }) => {
) : (
content
)}
<NodeViewContent />
</NodeViewWrapper>
);
};