tldraw/packages/www/pages/r/[id].tsx
2021-08-10 17:12:55 +01:00

22 lines
423 B
TypeScript

import { GetServerSideProps } from 'next'
import * as React from 'react'
export default function Room(): JSX.Element {
return <div>Todo</div>
}
export const getServerSideProps: GetServerSideProps = async (ctx) => {
const id = ctx.query.id?.toString()
// Get document from database
// If document does not exist, create an empty document
// Return the document
return {
props: {
id,
},
}
}