Created
December 3, 2021 04:49
-
-
Save hieptl/6328c5f0cb789952c3cdff4d60b12913 to your computer and use it in GitHub Desktop.
meetingheader.js - client - Zoom Clone
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 { useHistory } from 'react-router-dom'; | |
| import Context from '../../context'; | |
| function MeetingHeader() { | |
| const { meeting } = useContext(Context); | |
| const history = useHistory(); | |
| const stopMeeting = () => { | |
| history.push('/'); | |
| }; | |
| return ( | |
| <div className="header"> | |
| <div className="header__left"> | |
| <svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" onClick={stopMeeting}> | |
| <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M15 19l-7-7 7-7" /> | |
| </svg> | |
| <span className="header__app-name">{meeting?.meeting_title}</span> | |
| </div> | |
| </div> | |
| ); | |
| } | |
| export default MeetingHeader; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment