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
@@ -1,6 +1,6 @@
import { useState, useCallback } from 'react';
import { useParams } from 'react-router-dom';
import { services } from '@toeverything/datasource/db-service';
import { useCallback, useState } from 'react';
import { useParams } from 'react-router-dom';
import { WithEditorSelectionType } from '../menu/inline-menu/types';
export const useAddComment = ({
@@ -8,7 +8,7 @@ export const useAddComment = ({
selectionInfo,
setShow,
}: WithEditorSelectionType) => {
const { workspace_id: workspaceId, page_id: pageId } = useParams();
const { workspaceId, page_id: pageId } = useParams();
const [currentComment, setCurrentComment] = useState('');
const createComment = useCallback(async (): Promise<{
@@ -47,7 +47,7 @@ type SearchProps = {
};
export const Search = (props: SearchProps) => {
const { workspace_id: workspaceId } = useParams();
const { workspaceId } = useParams();
const navigate = useNavigate();
const [open, setOpen] = useState(false);