refactor(workspace): rename workspaceId

This commit is contained in:
tzhangchi
2022-09-08 19:13:03 +08:00
parent 61c266057a
commit 9442c023e5
18 changed files with 67 additions and 73 deletions
@@ -265,18 +265,18 @@ export class EditorBlock extends ServiceBaseClass {
}
}
async copyPage(
workspace_id: string,
workspaceId: string,
source_page_id: string,
new_page_id: string
): Promise<boolean> {
const db = await this.database.getDatabase(workspace_id);
const db = await this.database.getDatabase(workspaceId);
const source_page = await this.getBlock(
workspace_id,
workspaceId,
source_page_id as 'block'
);
const new_page = await this.getBlock(
workspace_id,
workspaceId,
new_page_id as 'block'
);
if (!source_page) {
+1 -1
View File
@@ -9,7 +9,7 @@ const _currentEditors = atom<EditorsMap>({} as EditorsMap);
/** hook for using editors outside page */
export const useCurrentEditors = () => {
const { workspace_id: workspaceId, page_id: pageId } = useParams();
const { workspaceId, page_id: pageId } = useParams();
const { pathname } = useLocation();
const [currentEditors, setCurrentEditors] = useAtom(_currentEditors);