kopia lustrzana https://github.com/Tldraw/Tldraw
whoops
rodzic
05d96b28bb
commit
cb9211b965
|
@ -113,7 +113,7 @@ export function MultiplayerEditor({
|
|||
const handleUiEvent = useHandleUiEvents()
|
||||
|
||||
const storeWithStatus = useRemoteSyncClient({
|
||||
uri: `${MULTIPLAYER_SERVER}/${RoomOpenModeToPath[roomOpenMode]}/${roomSlug}`,
|
||||
uri: `${MULTIPLAYER_SERVER}${RoomOpenModeToPath[roomOpenMode]}/${roomSlug}`,
|
||||
roomId: roomSlug,
|
||||
})
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@ type ShareState = {
|
|||
|
||||
function isSharedReadonlyUrl(pathname: string) {
|
||||
return (
|
||||
pathname.startsWith(`/${RoomOpenModeToPath[ROOM_OPEN_MODE.READ_ONLY]}/`) ||
|
||||
pathname.startsWith(`/${RoomOpenModeToPath[ROOM_OPEN_MODE.READ_ONLY_LEGACY]}/`)
|
||||
pathname.startsWith(`${RoomOpenModeToPath[ROOM_OPEN_MODE.READ_ONLY]}/`) ||
|
||||
pathname.startsWith(`${RoomOpenModeToPath[ROOM_OPEN_MODE.READ_ONLY_LEGACY]}/`)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -79,7 +79,9 @@ async function getReadonlyUrl() {
|
|||
if (!data.slug) return
|
||||
|
||||
segments[1] =
|
||||
RoomOpenModeToPath[data.isLegacy ? ROOM_OPEN_MODE.READ_ONLY_LEGACY : ROOM_OPEN_MODE.READ_ONLY]
|
||||
RoomOpenModeToPath[
|
||||
data.isLegacy ? ROOM_OPEN_MODE.READ_ONLY_LEGACY : ROOM_OPEN_MODE.READ_ONLY
|
||||
].substring(1)
|
||||
segments[2] = data.slug
|
||||
const newPathname = segments.join('/')
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue