f0f545806a
* remove sponsors, ui cleanup * fix radius * improve panel * remove cursor spline animations * migrate options * Switch hrs to divider * fix text color on menu dark mode * Remove option for clone handles * fix wheel * remove unused translations
33 lines
757 B
TypeScript
33 lines
757 B
TypeScript
import * as React from 'react'
|
|
import type { GetServerSideProps } from 'next'
|
|
import dynamic from 'next/dynamic'
|
|
|
|
const IFrameWarning = dynamic(() => import('components/IFrameWarning'), {
|
|
ssr: false,
|
|
}) as any
|
|
|
|
const MultiplayerEditor = dynamic(() => import('components/MultiplayerEditor'), {
|
|
ssr: false,
|
|
}) as any
|
|
|
|
interface RoomProps {
|
|
id: string
|
|
}
|
|
|
|
export default function Room({ id }: RoomProps) {
|
|
if (typeof window !== 'undefined' && window.self !== window.top) {
|
|
return <IFrameWarning url={`https://tldraw.com/r/${id}`} />
|
|
}
|
|
|
|
return <MultiplayerEditor roomId={id} />
|
|
}
|
|
|
|
export const getServerSideProps: GetServerSideProps = async (context) => {
|
|
const id = context.query.id?.toString()
|
|
|
|
return {
|
|
props: {
|
|
id,
|
|
},
|
|
}
|
|
}
|