mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-10 16:24:46 +03:00
fix: unable to add a second collection (#3405)
This commit is contained in:
parent
bc263e7afb
commit
ba53c74130
@ -7,7 +7,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { PlusIcon } from '@blocksuite/icons';
|
||||
import type { Workspace } from '@blocksuite/store';
|
||||
import { uuidv4 } from '@blocksuite/store';
|
||||
import { useMemo, useState } from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { useGetPageInfoById } from '../../../../hooks/use-get-page-info';
|
||||
|
||||
@ -22,16 +22,13 @@ export const AddCollectionButton = ({
|
||||
const setting = useCollectionManager(workspace.id);
|
||||
const t = useAFFiNEI18N();
|
||||
const [show, showUpdateCollection] = useState(false);
|
||||
const defaultCollection = useMemo(
|
||||
() => ({
|
||||
id: uuidv4(),
|
||||
name: '',
|
||||
pinned: true,
|
||||
filterList: [],
|
||||
workspaceId: workspace.id,
|
||||
}),
|
||||
[workspace.id]
|
||||
);
|
||||
const defaultCollection = {
|
||||
id: uuidv4(),
|
||||
name: '',
|
||||
pinned: true,
|
||||
filterList: [],
|
||||
workspaceId: workspace.id,
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<IconButton
|
||||
|
Loading…
Reference in New Issue
Block a user