123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import React from 'react';
- import { Link } from 'react-router-dom';
- import { connect } from 'dva';
- import { PageProps } from '@/utils/types/interface';
- import { GameModalController } from '@/utils/logic_tools/GameModal/game_modal';
- import styles from './index.less';
-
- class Main extends React.Component<PageProps> {
- state = {}
-
- componentDidMount() {
- const { dispatch } = this.props;
- dispatch({
- type: 'global/add'
- })
- }
-
- getDerivedStateFromProps(props: PageProps, state: any) {
-
- }
-
- render() {
- const { global } = this.props;
- return (
- <div className={styles.normal}>
- <Link to="/rank">
- main{global.count}
- </Link>
- <div
- onClick={() => {
- GameModalController.showPauseModal({
- content: '123',
- okText: 'ok',
- });
- }}
- >
- Modal
- </div>
- </div>
- );
- }
- }
-
- export default connect(({ global }: any) => ({ global }))(Main);
|