refactor: plugin loading logic (#3448)

This commit is contained in:
Alex Yang
2023-07-28 19:43:52 -07:00
committed by GitHub
parent 4cb1bf6a9f
commit 9f43c0ddc8
14 changed files with 332 additions and 138 deletions

View File

@@ -11,12 +11,13 @@ export const HeaderItem = (): ReactElement => {
<IconButton
onClick={useCallback(
() =>
// todo: abstract a context function to open a new tab
setLayout(layout => {
if (layout === 'editor') {
return {
direction: 'horizontal',
first: 'editor',
second: 'copilot',
second: '@affine/copilot',
splitPercentage: 70,
};
} else {