2022-03-24 09:05:35 +00:00
|
|
|
import dynamic from 'next/dynamic'
|
2021-09-06 13:37:48 +00:00
|
|
|
import Head from 'next/head'
|
2022-01-10 16:36:28 +00:00
|
|
|
import { useRouter } from 'next/router'
|
2022-07-23 14:05:48 +00:00
|
|
|
import { useMemo } from 'react'
|
2021-09-04 09:14:47 +00:00
|
|
|
|
2022-08-02 13:56:12 +00:00
|
|
|
const Editor = dynamic(() => import('~components/Editor'), { ssr: false }) as any
|
2021-09-04 12:02:13 +00:00
|
|
|
|
2022-07-23 14:05:48 +00:00
|
|
|
const Home = () => {
|
2022-01-10 16:36:28 +00:00
|
|
|
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>
|
2022-07-23 14:05:48 +00:00
|
|
|
<Editor id="home" showUI={!isExportMode} />
|
2021-09-06 13:37:48 +00:00
|
|
|
</>
|
|
|
|
)
|
2021-09-04 12:02:13 +00:00
|
|
|
}
|
|
|
|
|
2022-03-24 09:05:35 +00:00
|
|
|
export default Home
|