chore: clean code
This commit is contained in:
@@ -49,22 +49,3 @@ const SomeBlock = () => {
|
|||||||
return <div>...</div>;
|
return <div>...</div>;
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
## Scene
|
|
||||||
|
|
||||||
**Notice: The scene API will refactor at next version.**
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
const SomeBlock = () => {
|
|
||||||
const { scene, setScene, setPage, setTable, setKanban } =
|
|
||||||
useRecastBlockScene();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div>Scene: {scene}</div>
|
|
||||||
<button onClick={setPage}>list</button>
|
|
||||||
<button onClick={setKanban}>kanban</button>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const mergeGroup = async (...groups: AsyncBlock[]) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await mergeGroupProperties(...(groups as RecastBlock[]));
|
await mergeGroupProperties(...(groups as unknown as RecastBlock[]));
|
||||||
|
|
||||||
const [headGroup, ...restGroups] = groups;
|
const [headGroup, ...restGroups] = groups;
|
||||||
// Add all children to the head group
|
// Add all children to the head group
|
||||||
@@ -174,7 +174,7 @@ export const splitGroup = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
splitGroupProperties(
|
splitGroupProperties(
|
||||||
group as RecastBlock,
|
group as unknown as RecastBlock,
|
||||||
newGroupBlock as unknown as RecastBlock
|
newGroupBlock as unknown as RecastBlock
|
||||||
);
|
);
|
||||||
await group.after(newGroupBlock);
|
await group.after(newGroupBlock);
|
||||||
|
|||||||
Reference in New Issue
Block a user