mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
fix: blob fetch and state syncing between tabs (#1287)
This commit is contained in:
@@ -19,7 +19,11 @@ declare global {
|
||||
|
||||
const BroadcastPage: React.FC = () => {
|
||||
const blockSuiteWorkspace = useMemo(
|
||||
() => createEmptyBlockSuiteWorkspace('broadcast-test'),
|
||||
() =>
|
||||
createEmptyBlockSuiteWorkspace(
|
||||
'broadcast-test',
|
||||
(_: string) => undefined
|
||||
),
|
||||
[]
|
||||
);
|
||||
const [provider, setProvider] = useState<BroadCastChannelProvider | null>(
|
||||
|
||||
@@ -29,7 +29,10 @@ const PreviewPage: NextPage<PreviewPageProps> = ({
|
||||
const [blockSuiteWorkspace, setBlockSuiteWorkspace] =
|
||||
useState<BlockSuiteWorkspace | null>(null);
|
||||
useEffect(() => {
|
||||
const blockSuiteWorkspace = createEmptyBlockSuiteWorkspace('preview');
|
||||
const blockSuiteWorkspace = createEmptyBlockSuiteWorkspace(
|
||||
'preview',
|
||||
(_: string) => undefined
|
||||
);
|
||||
blockSuiteWorkspace.signals.pageAdded.once(() => {
|
||||
setBlockSuiteWorkspace(blockSuiteWorkspace);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user