File size: 525 Bytes
6b8fc2c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import React, { FC } from 'react';
import { IndexModelState, ConnectProps, Loading, connect } from 'umi';

interface PageProps extends ConnectProps {
    index: IndexModelState;
    loading: boolean;
}

const IndexPage: FC<PageProps> = ({ index, dispatch }) => {
    const { name } = index;
    return <div>chat: {name}</div>;
};

export default connect(
    ({ index, loading }: { index: IndexModelState; loading: Loading }) => ({
        index,
        loading: loading.models.index,
    }),
)(IndexPage);