| | |
| | | const _locale = sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS |
| | | |
| | | class Main extends Component { |
| | | state = {} |
| | | state = { |
| | | userId: sessionStorage.getItem('UserID') |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (!this.state.userId) { |
| | | this.props.history.replace('/login') |
| | | } |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('resetSelectLine', this.resetParentParam) |
| | |
| | | |
| | | render () { |
| | | const navBar = window.GLOB.navBar |
| | | |
| | | |
| | | if (!this.state.userId) return null |
| | | |
| | | return ( |
| | | <div className="mk-main-view"> |
| | | <ConfigProvider locale={_locale}> |