0c5f8dda48
* remove sponsorwall for main route * Adds sponsorship link * Remove all sponsorwall * Fix sponsorship link appearance on dark mode * Add heart icon * Fix text bug * Fix toolbar, hide resize handles on sticky * Add eraser * Update Kbd.tsx * cleanup * base zoom delta on event deltaMode * Fix image in example * Fix eraser icon * eraser tool resets to previous tool * Update EraseTool.spec.ts * Improves support for locked shapes * Update _document.tsx * Update CHANGELOG.md * Adds multiplayer menu, fix develop route in example * Tighten up top panel padding * Update top bar, bump packages * refactor TLDrawState -> TLDrawApp, mutables, new tests * Fix scaling bug, delete groups bug * fix snapping * add pressure to points * Remove mutables, rename to tldraw (or Tldraw) * Clean up types, add darkmode prop * more renaming * rename getShapeUtils to getShapeUtil * Fix file names * Fix last bugs related to renaming * Update state to app in tests * rename types to TD * remove unused styles / rename styles * slight update to panel * Fix rogue radix perf issue * Update ZoomMenu.tsx * Consolidate style panel * Fix text wrapping in text shape, improve action menu * Fix props * add indicators for tool lock * fix calloits * Add click to erase shapes * Slightly improve loading screen * Update PrimaryTools.tsx * remove force consistent filenames from tsconfig * Update useTldrawApp.tsx * fix capitalization * Update main.yml
29 lines
778 B
TypeScript
29 lines
778 B
TypeScript
import * as React from 'react'
|
|
import type { GetServerSideProps } from 'next'
|
|
import { getSession } from 'next-auth/client'
|
|
import dynamic from 'next/dynamic'
|
|
const MultiplayerEditor = dynamic(() => import('-components/MultiplayerEditor'), { ssr: false })
|
|
|
|
interface RoomProps {
|
|
id: string
|
|
isSponsor: boolean
|
|
isUser: boolean
|
|
}
|
|
|
|
export default function Room({ id, isUser, isSponsor }: RoomProps): JSX.Element {
|
|
return <MultiplayerEditor isUser={isUser} isSponsor={isSponsor} roomId={id} />
|
|
}
|
|
|
|
export const getServerSideProps: GetServerSideProps = async (context) => {
|
|
const session = await getSession(context)
|
|
|
|
const id = context.query.id?.toString()
|
|
|
|
return {
|
|
props: {
|
|
id,
|
|
isUser: false,
|
|
isSponsor: session?.user ? true : false,
|
|
},
|
|
}
|
|
}
|