refactor: use nano id (#1234)

This commit is contained in:
Himself65
2023-03-01 12:16:36 -06:00
committed by GitHub
parent f888a9e6e0
commit 0df288ba2c
4 changed files with 10 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
import { Workspace } from '@affine/datacenter';
import { uuidv4 } from '@blocksuite/store';
import { nanoid } from '@blocksuite/store';
import { useCallback, useMemo, useSyncExternalStore } from 'react';
import useSWR from 'swr';
import { IndexeddbPersistence } from 'y-indexeddb';
@@ -37,7 +37,7 @@ declare global {
globalThis.dataCenter = dataCenter;
function createRemLocalWorkspace(name: string) {
const id = uuidv4();
const id = nanoid();
const blockSuiteWorkspace = createEmptyBlockSuiteWorkspace(id);
blockSuiteWorkspace.meta.setName(name);
const workspace: LocalWorkspace = {