Signal drop!
Relay (operand.online) is unreachable.
Usually, a dropped signal means an upgrade is happening. Hold on!
Sorry, no connección.
Hang in there while we get back on track
gram: essay
> ./src/tldraw/mount.ts
Lenses
(coming soon!)
import React from "react"
import ReactDom from "react-dom/client"
import { TLDraw } from "./components/TLDraw.js"
import { RepoContext } from "@automerge/automerge-repo-react-hooks"
export function mount(node, params) {
// workaround different conventions for documentUrl
if (!params.docUrl && params.documentUrl) {
params.docUrl = params.documentUrl
}
ReactDom.createRoot(node).render(
// We get the Automerge Repo from the global window;
// this is set by either our standalone entrypoint or trailrunner
React.createElement(
RepoContext.Provider,
// eslint-disable-next-line no-undef
// @ts-expect-error - repo is on window
{ value: repo },
React.createElement(TLDraw, Object.assign({}, params))
)
)
}