A few more async routes (#3023)

This PR makes a few more of our routes async.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
This commit is contained in:
Steve Ruiz 2024-03-02 17:17:09 +00:00 committed by GitHub
parent 66a8b0a4a6
commit 52df06b014
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View file

@ -27,7 +27,7 @@ if (!basicExample) throw new Error('Could not find initial example')
const router = createBrowserRouter([ const router = createBrowserRouter([
{ {
path: '*', path: '*',
element: <div>404</div>, lazy: async () => ({ element: <div>404</div> }),
}, },
{ {
path: '/', path: '/',
@ -44,11 +44,11 @@ const router = createBrowserRouter([
}, },
{ {
path: 'develop', path: 'develop',
element: <Develop />, lazy: async () => ({ element: <Develop /> }),
}, },
{ {
path: 'end-to-end', path: 'end-to-end',
element: <EndToEnd />, lazy: async () => ({ element: <EndToEnd /> }),
}, },
...examples.flatMap((exampleArray) => ...examples.flatMap((exampleArray) =>
exampleArray.value.flatMap((example) => [ exampleArray.value.flatMap((example) => [
@ -77,6 +77,7 @@ const router = createBrowserRouter([
]) ])
), ),
]) ])
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const rootElement = document.getElementById('root')! const rootElement = document.getElementById('root')!
const root = createRoot(rootElement!) const root = createRoot(rootElement!)

View file

@ -38360,8 +38360,8 @@
}, },
{ {
"kind": "Reference", "kind": "Reference",
"text": "TLHistoryMark", "text": "TLCommand",
"canonicalReference": "@tldraw/editor!TLHistoryMark:type" "canonicalReference": "@tldraw/editor!TLCommand:type"
}, },
{ {
"kind": "Content", "kind": "Content",
@ -38369,8 +38369,8 @@
}, },
{ {
"kind": "Reference", "kind": "Reference",
"text": "TLCommand", "text": "TLHistoryMark",
"canonicalReference": "@tldraw/editor!TLCommand:type" "canonicalReference": "@tldraw/editor!TLHistoryMark:type"
}, },
{ {
"kind": "Content", "kind": "Content",
@ -39151,7 +39151,7 @@
}, },
{ {
"kind": "Content", "kind": "Content",
"text": ") => (() => void | undefined) | undefined | void" "text": ") => (() => undefined | void) | undefined | void"
}, },
{ {
"kind": "Content", "kind": "Content",