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 { 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>
|
||||
)
|
||||
|
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
|
||||
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>
|
||||
)
|
||||
|
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