feat: wire up public room

This commit is contained in:
Jeremy Kahn 2022-08-09 22:14:59 -05:00
parent 3b1a55067d
commit 65196ae9c4
6 changed files with 21 additions and 0 deletions

View File

@ -2,12 +2,14 @@ import React from 'react'
import { Routes, Route } from 'react-router-dom'
import { Home } from './pages/Home/'
import { PublicRoom } from './pages/PublicRoom/'
function Bootstrap() {
return (
<div className="Chitchatter">
<Routes>
<Route path="/" element={<Home />} />
<Route path="/public/:roomId" element={<PublicRoom />} />
</Routes>
</div>
)

View File

@ -0,0 +1,9 @@
import { useParams } from 'react-router-dom'
export function Room() {
const params = useParams()
const { roomId } = params
return <>Room ID: {roomId}</>
}

View File

@ -0,0 +1 @@
export * from './Room'

View File

@ -11,6 +11,9 @@ export function Home() {
for maximum security. All communication between you and your online
peers is encrypted and ephemeral.
</Typography>
<Typography variant="body1">
chitchatter is still a work in progress and not yet ready to be used!
</Typography>
</header>
</div>
)

View File

@ -0,0 +1,5 @@
import { Room } from '../../components/Room'
export function PublicRoom() {
return <Room />
}

View File

@ -0,0 +1 @@
export * from './PublicRoom'