mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 17:29:19 +08:00
change workspacetype to worksopace until
This commit is contained in:
@@ -19,8 +19,8 @@ export const CreateWorkspaceModal = ({ open, onClose }: ModalProps) => {
|
||||
const router = useRouter();
|
||||
const handleCreateWorkspace = async () => {
|
||||
const workspace = await createWorkspace(workspaceName);
|
||||
if (workspace && workspace.room) {
|
||||
router.replace(`/workspace/${workspace.room}`);
|
||||
if (workspace && workspace.id) {
|
||||
router.replace(`/workspace/${workspace.id}`);
|
||||
onClose();
|
||||
} else {
|
||||
console.log('create error');
|
||||
|
||||
@@ -22,11 +22,11 @@ export const ImportModal = ({ open, onClose }: ImportModalProps) => {
|
||||
const { currentWorkspace } = useAppState();
|
||||
const { t } = useTranslation();
|
||||
const _applyTemplate = function (pageId: string, template: Template) {
|
||||
const page = currentWorkspace?.getPage(pageId);
|
||||
const page = currentWorkspace?.blocksuiteWorkspace?.getPage(pageId);
|
||||
|
||||
const title = template.name;
|
||||
if (page) {
|
||||
currentWorkspace?.setPageMeta(page.id, { title });
|
||||
currentWorkspace?.blocksuiteWorkspace?.setPageMeta(page.id, { title });
|
||||
if (page && page.root === null) {
|
||||
setTimeout(() => {
|
||||
const editor = document.querySelector('editor-container');
|
||||
|
||||
@@ -80,7 +80,7 @@ export const Input = (props: {
|
||||
}}
|
||||
placeholder={
|
||||
isPublish
|
||||
? `Search in ${currentWorkspace?.meta.name}`
|
||||
? `Search in ${currentWorkspace?.blocksuiteWorkspace?.meta.name}`
|
||||
: 'Quick Search...'
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -52,7 +52,7 @@ export const WorkspaceModal = ({ open, onClose }: WorkspaceModalProps) => {
|
||||
router.replace(`/workspace/${item.id}`);
|
||||
onClose();
|
||||
}}
|
||||
active={item.id === currentWorkspace?.room}
|
||||
active={item.id === currentWorkspace?.id}
|
||||
key={index}
|
||||
>
|
||||
<span style={{ width: '100px' }}>
|
||||
|
||||
Reference in New Issue
Block a user