mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
refactor(workspace): rename workspaceId
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user