2021-08-10 17:19:30 +00:00
|
|
|
import * as React from 'react'
|
2021-09-09 12:32:08 +00:00
|
|
|
import { Switch, Route, Link } from 'react-router-dom'
|
2021-09-08 13:40:04 +00:00
|
|
|
import Basic from './basic'
|
2021-11-05 14:13:14 +00:00
|
|
|
import ReadOnly from './readonly'
|
2021-11-11 11:37:57 +00:00
|
|
|
import PropsControl from './props-control'
|
|
|
|
import ApiControl from './api-control'
|
|
|
|
import LoadingFiles from './loading-files'
|
2021-09-09 12:32:08 +00:00
|
|
|
import Embedded from './embedded'
|
2021-10-09 13:57:44 +00:00
|
|
|
import NoSizeEmbedded from './no-size-embedded'
|
2021-09-09 12:32:08 +00:00
|
|
|
import ChangingId from './changing-id'
|
2021-11-11 11:37:57 +00:00
|
|
|
import Persisted from './persisted'
|
|
|
|
import Develop from './develop'
|
|
|
|
import Api from './api'
|
|
|
|
import FileSystem from './file-system'
|
|
|
|
import UIOptions from './ui-options'
|
|
|
|
import { Multiplayer } from './multiplayer'
|
2021-09-09 13:58:55 +00:00
|
|
|
import './styles.css'
|
2021-08-10 17:19:30 +00:00
|
|
|
|
|
|
|
export default function App(): JSX.Element {
|
2021-09-09 12:32:08 +00:00
|
|
|
return (
|
|
|
|
<main>
|
|
|
|
<Switch>
|
2021-11-16 16:01:29 +00:00
|
|
|
<Route path="/develop">
|
2021-11-11 11:37:57 +00:00
|
|
|
<Develop />
|
|
|
|
</Route>
|
2021-09-09 12:32:08 +00:00
|
|
|
<Route path="/basic">
|
|
|
|
<Basic />
|
|
|
|
</Route>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Route path="/ui-options">
|
|
|
|
<UIOptions />
|
|
|
|
</Route>
|
|
|
|
<Route path="/persisted">
|
|
|
|
<Persisted />
|
|
|
|
</Route>
|
|
|
|
<Route path="/loading-files">
|
|
|
|
<LoadingFiles />
|
|
|
|
</Route>
|
|
|
|
<Route path="/file-system">
|
|
|
|
<FileSystem />
|
|
|
|
</Route>
|
|
|
|
<Route path="/api">
|
|
|
|
<Api />
|
|
|
|
</Route>
|
2021-11-05 14:13:14 +00:00
|
|
|
<Route path="/readonly">
|
|
|
|
<ReadOnly />
|
|
|
|
</Route>
|
2021-09-09 12:32:08 +00:00
|
|
|
<Route path="/controlled">
|
2021-11-11 11:37:57 +00:00
|
|
|
<PropsControl />
|
2021-09-09 12:32:08 +00:00
|
|
|
</Route>
|
|
|
|
<Route path="/imperative">
|
2021-11-11 11:37:57 +00:00
|
|
|
<ApiControl />
|
2021-09-09 12:32:08 +00:00
|
|
|
</Route>
|
|
|
|
<Route path="/changing-id">
|
|
|
|
<ChangingId />
|
|
|
|
</Route>
|
|
|
|
<Route path="/embedded">
|
|
|
|
<Embedded />
|
|
|
|
</Route>
|
2021-09-22 11:28:55 +00:00
|
|
|
<Route path="/no-size-embedded">
|
|
|
|
<NoSizeEmbedded />
|
|
|
|
</Route>
|
2021-10-09 13:57:44 +00:00
|
|
|
<Route path="/multiplayer">
|
|
|
|
<Multiplayer />
|
2021-10-08 23:05:24 +00:00
|
|
|
</Route>
|
2021-09-09 12:32:08 +00:00
|
|
|
<Route path="/">
|
2021-11-16 16:01:29 +00:00
|
|
|
<img className="hero" src="./card-repo.png" />
|
2021-11-11 11:37:57 +00:00
|
|
|
<ul className="links">
|
|
|
|
<li>
|
2021-11-16 16:01:29 +00:00
|
|
|
<Link to="/develop">Develop</Link>
|
2021-11-11 11:37:57 +00:00
|
|
|
</li>
|
|
|
|
<hr />
|
|
|
|
<li>
|
|
|
|
<Link to="/basic">Basic</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link to="/ui-options">UI Options</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link to="/persisted">Persisting State with an ID</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link to="/file-system">Using the File System</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link to="/readonly">Readonly Mode</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link to="/loading-files">Loading Files</Link>
|
|
|
|
</li>
|
2021-09-09 12:32:08 +00:00
|
|
|
<li>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Link to="/file-system">Using the File System</Link>
|
2021-09-09 12:32:08 +00:00
|
|
|
</li>
|
2021-11-05 14:13:14 +00:00
|
|
|
<li>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Link to="/controlled">Controlled via Props</Link>
|
2021-11-05 14:13:14 +00:00
|
|
|
</li>
|
2021-09-09 12:32:08 +00:00
|
|
|
<li>
|
2021-11-16 16:01:29 +00:00
|
|
|
<Link to="/api">Using the TldrawApp API</Link>
|
2021-09-09 12:32:08 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-11-16 16:01:29 +00:00
|
|
|
<Link to="/imperative">Controlled via TldrawApp API</Link>
|
2021-09-09 12:32:08 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Link to="/changing-id">Changing ID</Link>
|
2021-09-09 12:32:08 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Link to="/embedded">Embedded</Link>
|
2021-09-09 12:32:08 +00:00
|
|
|
</li>
|
2021-09-22 11:28:55 +00:00
|
|
|
<li>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Link to="/no-size-embedded">Embedded (without explicit size)</Link>
|
2021-09-22 11:28:55 +00:00
|
|
|
</li>
|
2021-10-08 23:05:24 +00:00
|
|
|
<li>
|
2021-11-11 11:37:57 +00:00
|
|
|
<Link to="/multiplayer">Multiplayer</Link>
|
2021-10-08 23:05:24 +00:00
|
|
|
</li>
|
2021-09-09 12:32:08 +00:00
|
|
|
</ul>
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</main>
|
|
|
|
)
|
2021-08-10 17:19:30 +00:00
|
|
|
}
|