[improvement] copy assets when copying to multiplayer room (#694)
This commit is contained in:
parent
13f5787c31
commit
cacb4b7827
8 changed files with 122 additions and 15 deletions
|
@ -1,5 +1,6 @@
|
|||
import { Tldraw, TldrawApp, TldrawProps, useFileSystem } from '@tldraw/tldraw'
|
||||
import { useAccountHandlers } from 'hooks/useAccountHandlers'
|
||||
import { useUploadAssets } from 'hooks/useUploadAssets'
|
||||
import React, { FC } from 'react'
|
||||
import * as gtag from 'utils/gtag'
|
||||
|
||||
|
@ -35,6 +36,8 @@ const Editor: FC<EditorProps & Partial<TldrawProps>> = ({
|
|||
|
||||
const { onSignIn, onSignOut } = useAccountHandlers()
|
||||
|
||||
const { onAssetUpload } = useUploadAssets()
|
||||
|
||||
return (
|
||||
<div className="tldraw">
|
||||
<Tldraw
|
||||
|
@ -45,6 +48,7 @@ const Editor: FC<EditorProps & Partial<TldrawProps>> = ({
|
|||
showSponsorLink={!isSponsor}
|
||||
onSignIn={isSponsor ? undefined : onSignIn}
|
||||
onSignOut={isUser ? onSignOut : undefined}
|
||||
onAssetUpload={onAssetUpload}
|
||||
{...fileSystemEvents}
|
||||
{...rest}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue