diff --git a/apps/examples/src/HomePage.tsx b/apps/examples/src/HomePage.tsx
deleted file mode 100644
index 32dd4dc78..000000000
--- a/apps/examples/src/HomePage.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import { ExamplesLink } from './components/ExamplesLink'
-import ExamplesTldrawLogo from './components/ExamplesTldrawLogo'
-import { examples } from './examples'
-
-export function HomePage() {
- return (
-
-
-
- {examples.map((e) =>
- e.value.map((e) => )
- )}
-
-
-
- )
-}
diff --git a/apps/examples/src/index.tsx b/apps/examples/src/index.tsx
index b0d023419..023665354 100644
--- a/apps/examples/src/index.tsx
+++ b/apps/examples/src/index.tsx
@@ -8,7 +8,6 @@ import {
import { createRoot } from 'react-dom/client'
import { RouterProvider, createBrowserRouter } from 'react-router-dom'
import { ExamplePage } from './ExamplePage'
-import { HomePage } from './HomePage'
import { examples } from './examples'
import EndToEnd from './testing/end-to-end'
@@ -19,11 +18,24 @@ import EndToEnd from './testing/end-to-end'
const assetUrls = getAssetUrlsByMetaUrl()
setDefaultEditorAssetUrls(assetUrls)
setDefaultUiAssetUrls(assetUrls)
+const gettingStartedExamples = examples.find((e) => e.id === 'Getting Started')
+if (!gettingStartedExamples) throw new Error('Could not find getting started exmaples')
+const basicExample = gettingStartedExamples.value.find((e) => e.title === 'Basic')
+if (!basicExample) throw new Error('Could not find basic example')
const router = createBrowserRouter([
{
path: '/',
- element: ,
+ lazy: async () => {
+ const Component = await basicExample.loadComponent()
+ return {
+ element: (
+
+
+
+ ),
+ }
+ },
},
{
path: 'end-to-end',