diff --git a/sports-matcher/public/chief.jpg b/sports-matcher/public/chief.jpg new file mode 100644 index 0000000..3335964 Binary files /dev/null and b/sports-matcher/public/chief.jpg differ diff --git a/sports-matcher/public/freeman.jpg b/sports-matcher/public/freeman.jpg new file mode 100644 index 0000000..45d5175 Binary files /dev/null and b/sports-matcher/public/freeman.jpg differ diff --git a/sports-matcher/public/shogun.jpg b/sports-matcher/public/shogun.jpg new file mode 100644 index 0000000..276e987 Binary files /dev/null and b/sports-matcher/public/shogun.jpg differ diff --git a/sports-matcher/src/Chat.js b/sports-matcher/src/Chat.js new file mode 100644 index 0000000..da3ac21 --- /dev/null +++ b/sports-matcher/src/Chat.js @@ -0,0 +1,18 @@ +/* Please direct questions to Hansi Xu (Wallace LaWall on Discord) */ + +import React from 'react'; +import './chats.css' + +class Chat extends React.Component { + render() { + return ( +
+
+ {this.props.message} +
+
+ ) + } +} + +export default Chat; \ No newline at end of file diff --git a/sports-matcher/src/ChatWindow.js b/sports-matcher/src/ChatWindow.js new file mode 100644 index 0000000..036ad55 --- /dev/null +++ b/sports-matcher/src/ChatWindow.js @@ -0,0 +1,113 @@ +/* Please direct questions to Hansi Xu (Wallace LaWall on Discord) */ + +import React from 'react'; +import './chats.css' +import Chat from './Chat' +import Contact from './Contact' +import { useState } from "react"; + +class ChatWindow extends React.Component { + render() { + return ( +
+ + + +
+ ) + } +} + +class UserList extends React.Component { + + render() { + return ( +
+ + + +
+ ) + } +} + +class MessageList extends React.Component { + render() { + return ( +
+ + + + +
+ ) + } +} +// class ChatWindow extends React.Component { +// render() { +// return ( +//
+// +// {/* */} +//
+// ) +// } +// } +const ChatInput = () => { + const [message, setMessage] = useState( '' ); + + // const onKeyPress = (e) => { + // // if(e.key === 'Enter'){ + // // e.preventDefault(); // Ensure it is only this code that runs + // // setMessage("") + // // } + // } + + const onKeyDown = (e) => { + const keyCode = e.which || e.keyCode; + + // 13 represents the Enter key + if (keyCode === 13 && !e.shiftKey) { + e.preventDefault(); + setMessage("") + } + } + + return ( + // onKeyPress={(e) => onKeyPress(e)} +
+