refactor: remove React.FC (#3694)

This commit is contained in:
Garfield Lee
2023-08-11 22:58:44 +08:00
committed by GitHub
parent ce21ea78eb
commit e9f4912665
3 changed files with 11 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ import type { SerializedBlock } from '@blocksuite/blocks';
import type { BaseBlockModel } from '@blocksuite/store';
import type { Page } from '@blocksuite/store';
import type { VEditor } from '@blocksuite/virgo';
import type { FC, ReactElement } from 'react';
import type { ReactElement } from 'react';
import { StrictMode } from 'react';
import { useCallback, useEffect, useMemo, useState } from 'react';
@@ -121,7 +121,7 @@ const shouldShowBookmarkMenu = (pastedBlocks: SerializedBlock[]) => {
return !!firstBlock.text[0].attributes?.link;
};
const BookMarkUI: FC<BookMarkProps> = ({ page }) => {
const BookMarkUI = ({ page }: BookMarkProps) => {
const [anchor, setAnchor] = useState<Range | null>(null);
const [selectedOption, setSelectedOption] = useState<string>(
menuOptions[0].id