forked from Shiloh/remnantchat
feat: wire up public room
This commit is contained in:
parent
3b1a55067d
commit
65196ae9c4
@ -2,12 +2,14 @@ import React from 'react'
|
|||||||
import { Routes, Route } from 'react-router-dom'
|
import { Routes, Route } from 'react-router-dom'
|
||||||
|
|
||||||
import { Home } from './pages/Home/'
|
import { Home } from './pages/Home/'
|
||||||
|
import { PublicRoom } from './pages/PublicRoom/'
|
||||||
|
|
||||||
function Bootstrap() {
|
function Bootstrap() {
|
||||||
return (
|
return (
|
||||||
<div className="Chitchatter">
|
<div className="Chitchatter">
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path="/" element={<Home />} />
|
<Route path="/" element={<Home />} />
|
||||||
|
<Route path="/public/:roomId" element={<PublicRoom />} />
|
||||||
</Routes>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
9
src/components/Room/Room.tsx
Normal file
9
src/components/Room/Room.tsx
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { useParams } from 'react-router-dom'
|
||||||
|
|
||||||
|
export function Room() {
|
||||||
|
const params = useParams()
|
||||||
|
|
||||||
|
const { roomId } = params
|
||||||
|
|
||||||
|
return <>Room ID: {roomId}</>
|
||||||
|
}
|
1
src/components/Room/index.ts
Normal file
1
src/components/Room/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './Room'
|
@ -11,6 +11,9 @@ export function Home() {
|
|||||||
for maximum security. All communication between you and your online
|
for maximum security. All communication between you and your online
|
||||||
peers is encrypted and ephemeral.
|
peers is encrypted and ephemeral.
|
||||||
</Typography>
|
</Typography>
|
||||||
|
<Typography variant="body1">
|
||||||
|
chitchatter is still a work in progress and not yet ready to be used!
|
||||||
|
</Typography>
|
||||||
</header>
|
</header>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
5
src/pages/PublicRoom/PublicRoom.tsx
Normal file
5
src/pages/PublicRoom/PublicRoom.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { Room } from '../../components/Room'
|
||||||
|
|
||||||
|
export function PublicRoom() {
|
||||||
|
return <Room />
|
||||||
|
}
|
1
src/pages/PublicRoom/index.ts
Normal file
1
src/pages/PublicRoom/index.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from './PublicRoom'
|
Loading…
Reference in New Issue
Block a user