Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine join and chat pages into one url #29

Closed
Tracked by #12 ...
siberowl opened this issue Aug 3, 2021 · 2 comments · Fixed by #30
Closed
Tracked by #12 ...

Combine join and chat pages into one url #29

siberowl opened this issue Aug 3, 2021 · 2 comments · Fixed by #30
Labels
enhancement New feature or request

Comments

@siberowl
Copy link
Collaborator

siberowl commented Aug 3, 2021

Instead of jumping between url's, organize the components onto a single page.

This was referenced Aug 3, 2021
@Njima1572
Copy link
Collaborator

Also make it into separate rooms by /:room_id routing

@Njima1572
Copy link
Collaborator

Njima1572 commented Aug 4, 2021

server has rooms like

User = {id: string}
Room = {id: string, members: User[] };
rooms = {
   [room_id]: Room
}

Client access room with /:room_id => Room.tsx

const HOST_URL = url
const socket = socketIOClient(HOST_URL)
const App = () => (
    <div>
      <Router>
       <Switch>
        <Route path={'/:room_id`} component={Room} arg={socket} /> // Or whatever it is
        </Switch>
       </Router>
     </div>
)

This was referenced Aug 4, 2021
@siberowl siberowl added the enhancement New feature or request label Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants