Skip to content

Instantly share code, notes, and snippets.

@hieptl
Last active November 8, 2021 08:03
Show Gist options
  • Save hieptl/29e503d179e23ae944aefb3327bc7d82 to your computer and use it in GitHub Desktop.
Save hieptl/29e503d179e23ae944aefb3327bc7d82 to your computer and use it in GitHub Desktop.
home.js - Encrypted Chat App
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