mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
refactor: use nano id (#1234)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { setUpLanguage, useTranslation } from '@affine/i18n';
|
||||
import { assertExists, uuidv4 } from '@blocksuite/store';
|
||||
import { assertExists, nanoid } from '@blocksuite/store';
|
||||
import { useAtom, useAtomValue } from 'jotai';
|
||||
import { atomWithStorage } from 'jotai/utils';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -84,7 +84,7 @@ export const WorkspaceLayout: React.FC<React.PropsWithChildren> = ({
|
||||
[currentWorkspace, isPublicWorkspace, router]
|
||||
);
|
||||
const handleCreatePage = useCallback(async () => {
|
||||
return helper.createPage(uuidv4());
|
||||
return helper.createPage(nanoid());
|
||||
}, [helper]);
|
||||
const handleOpenWorkspaceListModal = useCallback(() => {
|
||||
setOpenWorkspacesModal(true);
|
||||
|
||||
Reference in New Issue
Block a user