2021-08-11 21:11:23 +00:00
|
|
|
import type { GetServerSideProps } from 'next'
|
2021-08-10 16:12:55 +00:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|