This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/App.js | |
import React, { Component } from 'react' | |
import UsernameForm from './UsernameForm' | |
class App extends Component { | |
state = { | |
currentUsername: null, | |
currentId: null | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/Chat.js | |
import React, { Component } from 'react' | |
class Chat extends Component { | |
render() { | |
return ( | |
<div> | |
<h1>Chat</h1> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/App.js | |
import React, { Component } from 'react' | |
import UsernameForm from './UsernameForm' | |
+import Chat from './Chat' | |
class App extends Component { | |
state = { | |
currentUsername: null, | |
- currentId: null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/Chat.js | |
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
class Chat extends Component { | |
state = { | |
currentUser: null | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ./src/index.css */ | |
body { | |
font-family: BlinkMacSystemFont, sans-serif; | |
margin: 0; | |
padding: 0; | |
} | |
.username-form { | |
padding: 10px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/MessageList.js | |
import React, { Component } from 'react' | |
import { | |
ListView, | |
ListViewSection, | |
ListViewSectionHeader, | |
ListViewRow, | |
Text | |
} from 'react-desktop/macOs' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/Chat.js | |
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
+import MessageList from './MessageList' | |
class Chat extends React.Component { | |
state = { | |
- currentUser: null | |
+ currentUser: null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/SendMessageForm.js | |
import React, { Component } from 'react' | |
import { Button, TextInput } from 'react-desktop/macOs' | |
class SendMessageForm extends Component { | |
state = { | |
text: '' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/Chat.js | |
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
import MessageList from './MessageList' | |
+import SendMessageForm from './SendMessageForm' | |
class Chat extends React.Component { | |
state = { | |
currentUser: null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./src/OnlineList.js | |
import React, { Component } from 'react' | |
import { | |
ListView, | |
ListViewSection, | |
ListViewSectionHeader, | |
ListViewRow, | |
Text | |
} from 'react-desktop/macOs' |