owncast/web/components/layouts/Main.tsx

23 lines
580 B
TypeScript
Raw Normal View History

import { Layout } from 'antd';
2022-05-09 04:05:37 +03:00
import { useRecoilValue } from 'recoil';
import { ClientConfigStore, clientConfigStateAtom } from '../stores/ClientConfigStore';
2022-05-04 00:55:13 +03:00
import { Content, Header } from '../ui';
2022-05-09 04:05:37 +03:00
import { ClientConfig } from '../../interfaces/client-config.model';
function Main() {
2022-05-09 04:05:37 +03:00
const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom);
const { name, title } = clientConfig;
return (
<>
<ClientConfigStore />
<Layout>
2022-05-09 04:05:37 +03:00
<Header name={title || name} />
2022-05-04 00:55:13 +03:00
<Content />
</Layout>
</>
);
}
export default Main;