Last active
November 8, 2021 08:03
-
-
Save hieptl/29e503d179e23ae944aefb3327bc7d82 to your computer and use it in GitHub Desktop.
home.js - Encrypted Chat App
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
import { useContext } from 'react'; | |
import { CometChatUI } from '../cometchat-pro-react-ui-kit/CometChatWorkspace/src'; | |
import Header from './Header'; | |
import Context from '../context'; | |
const Home = () => { | |
const { eThree, cometChat } = useContext(Context); | |
if (!cometChat) { | |
return null; | |
} | |
return ( | |
<> | |
<Header /> | |
<div style={{ width: '100vw', height: '100vh', paddingTop: '3.5rem' }}> | |
<CometChatUI eThree={eThree} /> | |
</div> | |
</> | |
); | |
}; | |
export default Home; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment