[improvement] copy assets when copying to multiplayer room (#694)

This commit is contained in:
Steve Ruiz 2022-05-18 21:46:24 +01:00 committed by GitHub
parent 13f5787c31
commit cacb4b7827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 122 additions and 15 deletions

View file

@ -42,7 +42,7 @@ function Editor({ roomId, isUser, isSponsor }: Props) {
const fileSystemEvents = useFileSystem()
const { onSignIn, onSignOut } = useAccountHandlers()
const { error, ...events } = useMultiplayerState(roomId)
const { onAssetCreate, onAssetDelete } = useMultiplayerAssets()
const { onAssetCreate, onAssetUpload, onAssetDelete } = useMultiplayerAssets()
if (error) return <LoadingScreen>Error: {error.message}</LoadingScreen>
@ -57,6 +57,7 @@ function Editor({ roomId, isUser, isSponsor }: Props) {
onSignOut={isUser ? onSignOut : undefined}
onAssetCreate={onAssetCreate}
onAssetDelete={onAssetDelete}
onAssetUpload={onAssetUpload}
{...fileSystemEvents}
{...events}
/>