mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat: add @affine/sdk (#3536)
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import {
|
||||
currentWorkspaceIdAtom,
|
||||
rootStore,
|
||||
} from '@toeverything/plugin-infra/atom';
|
||||
import type { PluginContext } from '@toeverything/plugin-infra/entry';
|
||||
import type { PluginContext } from '@affine/sdk/entry';
|
||||
import { currentWorkspaceAtom, rootStore } from '@affine/sdk/entry';
|
||||
import { createElement } from 'react';
|
||||
import { lazy } from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
@@ -14,7 +11,7 @@ const HeaderItem = lazy(() =>
|
||||
export const entry = (context: PluginContext) => {
|
||||
console.log('register');
|
||||
console.log('hello, world!');
|
||||
console.log(rootStore.get(currentWorkspaceIdAtom));
|
||||
console.log(rootStore.get(currentWorkspaceAtom));
|
||||
context.register('headerItem', div => {
|
||||
const root = createRoot(div);
|
||||
root.render(createElement(HeaderItem));
|
||||
|
||||
Reference in New Issue
Block a user