tldraw/apps/www/pages/index.tsx

23 lines
502 B
TypeScript
Raw Normal View History

import dynamic from 'next/dynamic'
2021-09-06 13:37:48 +00:00
import Head from 'next/head'
import { useRouter } from 'next/router'
import { useMemo } from 'react'
const Editor = dynamic(() => import('components/Editor'), { ssr: false }) as any
2021-09-04 12:02:13 +00:00
const Home = () => {
const { query } = useRouter()
const isExportMode = useMemo(() => 'exportMode' in query, [query])
2021-09-06 13:37:48 +00:00
return (
<>
<Head>
2021-11-16 16:31:50 +00:00
<title>tldraw</title>
2021-09-06 13:37:48 +00:00
</Head>
<Editor id="home" showUI={!isExportMode} />
2021-09-06 13:37:48 +00:00
</>
)
2021-09-04 12:02:13 +00:00
}
export default Home