Fix to not ignore the `userId` option for `<Tldraw/>` component in `@tldraw/tldraw` (#1205)

The `userId` prop in the `<Tldraw/>` component from the `@tldraw/tldraw`
was previously ignored. This PR fixes that to make it operational again.
pull/1206/head
Orange Mug 2023-04-27 11:03:21 +01:00 zatwierdzone przez GitHub
rodzic 121ec72f25
commit da613ea6ef
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -21,15 +21,17 @@ export function Tldraw(
const userData = getUserData()
const userId = props.userId ?? userData.id
const syncedStore = useLocalSyncClient({
instanceId,
userId: userData.id,
userId: userId,
universalPersistenceKey: persistenceKey,
config: props.config,
})
return (
<TldrawEditor {...rest} instanceId={instanceId} userId={userData.id} store={syncedStore}>
<TldrawEditor {...rest} instanceId={instanceId} userId={userId} store={syncedStore}>
<TldrawUi {...rest}>
<ContextMenu>
<Canvas />