import React, { Component } from 'react'; import { RouteComponentProps, withRouter } from 'react-router-dom'; import styled from 'styled-components'; import CreateRoomInput from '../components/CreateRoomInput'; import { TalkyButton } from '../styles/button'; import './Home.css'; const StartChatButton = styled(TalkyButton)({ marginLeft: '5px', padding: '10px', display: 'inline-block', backgroundColor: '#00b0e9', color: 'white', ':hover': { backgroundColor: '#009ed2', color: 'white' } }); interface State { roomName: string; } class Home extends Component { constructor(props: RouteComponentProps) { super(props); this.state = { roomName: '' }; } public render() { return ( <>

Truly simple video chat
and screen sharing for groups

yourdomain/ Start a chat
); } private joinRoom = () => { this.props.history.push(`/${this.state.roomName}`); }; private onRoomNameChange = (roomName: string) => { this.setState({ roomName }); }; } export default withRouter(Home);