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
@@ -2,8 +2,8 @@ import { useNavigate, useParams } from 'react-router-dom';
import { Descendant } from 'slate';
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
import { BlockSearchItem } from '@toeverything/datasource/jwt';
import { styled } from '@toeverything/components/ui';
import { BlockSearchItem } from '@toeverything/datasource/jwt';
import { BlockPreview } from '../../block-preview';
@@ -26,14 +26,14 @@ type InlineRefLinkProps = {
};
export const InlineRefLink = ({ block, pageId }: InlineRefLinkProps) => {
const { workspace_id } = useParams();
const { workspaceId } = useParams();
const navigate = useNavigate();
if (block) {
return (
<BlockPreviewContainer
block={block}
onClick={() => navigate(`/${workspace_id}/${pageId}`)}
onClick={() => navigate(`/${workspaceId}/${pageId}`)}
/>
);
}