2021-04-14 14:44:12 +10:00
|
|
|
import React from 'react';
|
|
|
|
|
import './App.css';
|
2021-04-16 11:32:00 +10:00
|
|
|
import Room from './Room';
|
2021-04-14 14:44:12 +10:00
|
|
|
|
2021-04-14 15:23:00 +10:00
|
|
|
interface Props {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface State {
|
|
|
|
|
messages: string[]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class App extends React.Component<Props, State> {
|
|
|
|
|
constructor(props: Props) {
|
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
|
messages: ['Here is a line', 'Here is another line']
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<div className='App'>
|
2021-04-16 11:32:00 +10:00
|
|
|
<div className='chat-room'>
|
|
|
|
|
<Room lines={this.state.messages} />
|
2021-04-14 15:23:00 +10:00
|
|
|
</div>
|
2021-04-14 15:13:55 +10:00
|
|
|
</div>
|
2021-04-14 15:23:00 +10:00
|
|
|
);
|
|
|
|
|
}
|
2021-04-14 14:44:12 +10:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default App;
|