import { Space } from 'antd'; import { QuestionCircleOutlined } from '@ant-design/icons'; import React, { useEffect } from 'react'; import { SelectLang, useModel } from 'umi'; import Avatar from './AvatarDropdown'; import styles from './index.less'; import useSendWebsocketMessage from '@/hooks/websocket/useSendWebsocketMessage'; import { Store } from 'jetlinks-store'; import NoticeIcon from '../NoticeIcon'; // export type SiderTheme = 'light' | 'dark'; const GlobalHeaderRight: React.FC = () => { const { initialState } = useModel('@@initialState'); const [subscribeTopic] = useSendWebsocketMessage(); useEffect(() => { Store.set('sendMessage', subscribeTopic); }, []); if (!initialState || !initialState.settings) { return null; } const { navTheme, layout } = initialState.settings; let className = styles.right; if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') { className = `${styles.right} ${styles.dark}`; } return ( {/*umi ui, value: 'umi ui' },*/} {/* {*/} {/* label: Ant Design,*/} {/* value: 'Ant Design',*/} {/* },*/} {/* {*/} {/* label: Pro Table,*/} {/* value: 'Pro Table',*/} {/* },*/} {/* {*/} {/* label: Pro Layout,*/} {/* value: 'Pro Layout',*/} {/* },*/} {/* ]}*/} {/* // onSearch={value => {*/} {/* // console.log('input', value);*/} {/* // }}*/} {/*/>*/} { window.open('http://doc.jetlinks.cn'); }} > ); }; export default GlobalHeaderRight;