chore: reduce code by gndelia/codemod-replace-react-fc-typescript

This commit is contained in:
DarkSky
2022-08-12 01:26:27 +08:00
parent b4f56cda59
commit 40b617c429
73 changed files with 108 additions and 115 deletions

View File

@@ -11,7 +11,7 @@ const INITIAL_LIST: MenuItem[] = [];
const MESSAGES = {
NO_HEADINGS_FOUND: 'No headings found',
};
export const TocView: FC<CreateView> = ({ block, editor }) => {
export const TocView = ({ block, editor }: CreateView) => {
const [list, setList] = useState(INITIAL_LIST);
useEffect(() => {
const sync_toc = async () => {