diff --git a/packages/env/src/workspace.ts b/packages/env/src/workspace.ts
index 7da044f340..90766ced9e 100644
--- a/packages/env/src/workspace.ts
+++ b/packages/env/src/workspace.ts
@@ -6,7 +6,7 @@ import type {
PassiveDocProvider,
Workspace as BlockSuiteWorkspace,
} from '@blocksuite/store';
-import type { FC, PropsWithChildren } from 'react';
+import type { PropsWithChildren, ReactNode } from 'react';
import type { Collection } from './filter.js';
@@ -27,14 +27,14 @@ export interface AffineDownloadProvider extends PassiveDocProvider {
}
/**
- * Download the first binary from local indexeddb
+ * Download the first binary from local IndexedDB
*/
export interface BroadCastChannelProvider extends PassiveDocProvider {
flavour: 'broadcast-channel';
}
/**
- * Long polling provider with local indexeddb
+ * Long polling provider with local IndexedDB
*/
export interface LocalIndexedDBBackgroundProvider
extends StatusAdapter,
@@ -165,6 +165,10 @@ type PageListProps<_Flavour extends keyof WorkspaceRegistry> = {
collection: Collection;
};
+interface FC
{
+ (props: P): ReactNode;
+}
+
export interface WorkspaceUISchema {
Header: FC>;
PageDetail: FC>;
diff --git a/packages/sdk/src/entry.ts b/packages/sdk/src/entry.ts
index 4081420ac2..c7f3cda1d4 100644
--- a/packages/sdk/src/entry.ts
+++ b/packages/sdk/src/entry.ts
@@ -4,7 +4,7 @@ import type { Page } from '@blocksuite/store';
import type { Workspace } from '@blocksuite/store';
import type { Atom, getDefaultStore } from 'jotai/vanilla';
import type { WritableAtom } from 'jotai/vanilla/atom';
-import type { FC } from 'react';
+import type { FunctionComponent } from 'react';
export type Part = 'headerItem' | 'editor' | 'setting' | 'formatBar';
@@ -22,7 +22,7 @@ export type CallbackMap = {
export interface PluginContext {
register: (part: T, callback: CallbackMap[T]) => void;
utils: {
- PluginProvider: FC;
+ PluginProvider: FunctionComponent; // make more clear
};
}
diff --git a/plugins/bookmark/src/app.tsx b/plugins/bookmark/src/app.tsx
index 3d7e897301..8cbe83a62b 100644
--- a/plugins/bookmark/src/app.tsx
+++ b/plugins/bookmark/src/app.tsx
@@ -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 = ({ page }) => {
+const BookMarkUI = ({ page }: BookMarkProps) => {
const [anchor, setAnchor] = useState(null);
const [selectedOption, setSelectedOption] = useState(
menuOptions[0].id