mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-04 05:17:27 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			719 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			719 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { Layout } from 'antd';
 | 
						|
import { useRecoilValue } from 'recoil';
 | 
						|
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} chatAvailable={isChatAvailable} />
 | 
						|
        <Content />
 | 
						|
      </Layout>
 | 
						|
    </>
 | 
						|
  );
 | 
						|
}
 | 
						|
 | 
						|
export default Main;
 |