mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
refactor: remove unused code (#2484)
This commit is contained in:
@@ -21,7 +21,7 @@ export type EditorProps = {
|
||||
page: Page;
|
||||
mode: 'page' | 'edgeless';
|
||||
onInit: (page: Page, editor: Readonly<EditorContainer>) => void;
|
||||
onLoad?: (page: Page, editor: EditorContainer) => void;
|
||||
onLoad?: (page: Page, editor: EditorContainer) => () => void;
|
||||
style?: CSSProperties;
|
||||
};
|
||||
|
||||
@@ -67,7 +67,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
|
||||
if (page.root === null) {
|
||||
props.onInit(page, editor);
|
||||
}
|
||||
props.onLoad?.(page, editor);
|
||||
return props.onLoad?.(page, editor);
|
||||
}
|
||||
}, [props.page, props.onInit, props.onLoad, editor, props, page]);
|
||||
|
||||
|
||||
@@ -103,9 +103,6 @@ export const toast = (
|
||||
easing: 'cubic-bezier(0.21, 1.02, 0.73, 1)',
|
||||
fill: 'forwards' as const,
|
||||
}; // satisfies KeyframeAnimationOptions;
|
||||
// FIXME: Vitest not support element.animate,
|
||||
// can try it in `apps/web/src/components/__tests__/PinBoard.spec.tsx` `delete pivot`
|
||||
typeof element.animate === 'function' && element.animate(fadeIn, options);
|
||||
|
||||
setTimeout(async () => {
|
||||
if (typeof element.animate !== 'function') return;
|
||||
|
||||
Reference in New Issue
Block a user