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.
This commit is contained in:
Orange Mug 2023-04-27 11:03:21 +01:00 committed by GitHub
parent 121ec72f25
commit da613ea6ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 />