Skip to content

Instantly share code, notes, and snippets.

@hieptl
Created December 3, 2021 04:49
Show Gist options
  • Select an option

  • Save hieptl/6328c5f0cb789952c3cdff4d60b12913 to your computer and use it in GitHub Desktop.

Select an option

Save hieptl/6328c5f0cb789952c3cdff4d60b12913 to your computer and use it in GitHub Desktop.
meetingheader.js - client - Zoom Clone
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