2022-04-28 19:54:33 +03:00
|
|
|
import { Layout } from 'antd';
|
2022-05-14 00:44:16 +03:00
|
|
|
import { useRecoilValue } from 'recoil';
|
2022-05-12 09:31:31 +03:00
|
|
|
import { ChatState } from '../../../interfaces/application-state';
|
2022-05-08 11:45:45 +03:00
|
|
|
import { OwncastLogo, UserDropdown } from '../../common';
|
2022-05-14 00:44:16 +03:00
|
|
|
import { chatStateAtom } from '../../stores/ClientConfigStore';
|
2022-04-29 00:36:05 +03:00
|
|
|
import s from './Header.module.scss';
|
2022-04-28 19:54:33 +03:00
|
|
|
|
|
|
|
const { Header } = Layout;
|
|
|
|
|
2022-05-08 10:41:47 +03:00
|
|
|
interface Props {
|
|
|
|
name: string;
|
|
|
|
}
|
2022-04-28 19:54:33 +03:00
|
|
|
|
2022-05-08 10:41:47 +03:00
|
|
|
export default function HeaderComponent({ name = 'Your stream title' }: Props) {
|
2022-05-14 00:44:16 +03:00
|
|
|
const chatState = useRecoilValue<ChatState>(chatStateAtom);
|
|
|
|
|
2022-04-28 19:54:33 +03:00
|
|
|
return (
|
|
|
|
<Header className={`${s.header}`}>
|
2022-05-08 10:41:47 +03:00
|
|
|
<div className={`${s.logo}`}>
|
2022-05-12 09:31:31 +03:00
|
|
|
<OwncastLogo variant="contrast" />
|
2022-05-08 10:41:47 +03:00
|
|
|
<span>{name}</span>
|
|
|
|
</div>
|
2022-05-14 00:44:16 +03:00
|
|
|
<UserDropdown chatState={chatState} />
|
2022-04-28 19:54:33 +03:00
|
|
|
</Header>
|
|
|
|
);
|
|
|
|
}
|