-
-
Notifications
You must be signed in to change notification settings - Fork 337
Expand file tree
/
Copy pathStatusBar.tsx
More file actions
21 lines (18 loc) · 742 Bytes
/
StatusBar.tsx
File metadata and controls
21 lines (18 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { useSelector } from 'react-redux';
import { RootState } from '@/store/store';
import './StatusBar.scss';
export function StatusBar() {
const statusBarText = useSelector((state: RootState) => state.stage.statusBarText);
const showTitle = useSelector((state: RootState) => state.GUI.showTitle);
const showMenuPanel = useSelector((state: RootState) => state.GUI.showMenuPanel);
const showExtra = useSelector((state: RootState) => state.GUI.showExtra);
// 在标题、菜单、鉴赏模式时不显示状态框
if (showTitle || showMenuPanel || showExtra || !statusBarText) {
return null;
}
return (
<div className="status-bar">
<div className="status-bar-content">{statusBarText}</div>
</div>
);
}