tldraw/example/src/app.tsx

66 lines
1.7 KiB
TypeScript
Raw Normal View History

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'
import Basic from './basic'
import Controlled from './controlled'
2021-09-08 11:53:52 +00:00
import Imperative from './imperative'
2021-09-09 12:32:08 +00:00
import Embedded from './embedded'
import NoSizeEmbedded from './no-size-embedded'
import { Multiplayer } from './multiplayer'
2021-09-09 12:32:08 +00:00
import ChangingId from './changing-id'
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>
<Route path="/basic">
<Basic />
</Route>
<Route path="/controlled">
<Controlled />
</Route>
<Route path="/imperative">
<Imperative />
</Route>
<Route path="/changing-id">
<ChangingId />
</Route>
<Route path="/embedded">
<Embedded />
</Route>
<Route path="/no-size-embedded">
<NoSizeEmbedded />
</Route>
<Route path="/multiplayer">
<Multiplayer />
</Route>
2021-09-09 12:32:08 +00:00
<Route path="/">
<ul>
<li>
<Link to="/basic">basic</Link>
</li>
<li>
<Link to="/controlled">controlled</Link>
</li>
<li>
<Link to="/imperative">imperative</Link>
</li>
<li>
<Link to="/changing-id">changing id</Link>
</li>
<li>
<Link to="/embedded">embedded</Link>
</li>
<li>
<Link to="/no-size-embedded">embedded (no size)</Link>
</li>
<li>
<Link to="/multiplayer">multiplayer</Link>
</li>
2021-09-09 12:32:08 +00:00
</ul>
</Route>
</Switch>
</main>
)
2021-08-10 17:19:30 +00:00
}