2022-05-26 21:08:37 +03:00
|
|
|
import { Layout, Tag, Tooltip } from 'antd';
|
2022-05-08 11:45:45 +03:00
|
|
|
import { OwncastLogo, UserDropdown } from '../../common';
|
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-05-26 21:08:37 +03:00
|
|
|
chatAvailable: boolean;
|
2022-05-08 10:41:47 +03:00
|
|
|
}
|
2022-04-28 19:54:33 +03:00
|
|
|
|
2022-05-26 21:08:37 +03:00
|
|
|
export default function HeaderComponent({ name = 'Your stream title', chatAvailable }: Props) {
|
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-26 21:08:37 +03:00
|
|
|
{chatAvailable && <UserDropdown />}
|
|
|
|
{!chatAvailable && (
|
|
|
|
<Tooltip title="Chat is available when the stream is live." placement="left">
|
|
|
|
<Tag color="processing">Chat offline</Tag>
|
|
|
|
</Tooltip>
|
|
|
|
)}
|
2022-04-28 19:54:33 +03:00
|
|
|
</Header>
|
|
|
|
);
|
|
|
|
}
|