Remove user menu when chat is not available
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
import { Layout } from 'antd';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { ClientConfigStore, clientConfigStateAtom } from '../stores/ClientConfigStore';
|
||||
import {
|
||||
ClientConfigStore,
|
||||
isChatAvailableSelector,
|
||||
clientConfigStateAtom,
|
||||
} from '../stores/ClientConfigStore';
|
||||
import { Content, Header } from '../ui';
|
||||
import { ClientConfig } from '../../interfaces/client-config.model';
|
||||
|
||||
function Main() {
|
||||
const clientConfig = useRecoilValue<ClientConfig>(clientConfigStateAtom);
|
||||
const { name, title } = clientConfig;
|
||||
|
||||
const isChatAvailable = useRecoilValue<boolean>(isChatAvailableSelector);
|
||||
return (
|
||||
<>
|
||||
<ClientConfigStore />
|
||||
<Layout>
|
||||
<Header name={title || name} />
|
||||
<Header name={title || name} chatAvailable={isChatAvailable} />
|
||||
<Content />
|
||||
</Layout>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user