/** @format */

import * as React from 'react';
import loadable from 'react-loadable';
import Tabs, {CustomTabPaneProps} from '../../../components/Tabs';

const List = loadable({
    loader: () => import('./list'),
    loading: () => <div>loading...</div>,
});

const Trends = loadable({
    loader: () => import('./trends'),
    loading: () => <div>loading...</div>,
});

const dataSource: CustomTabPaneProps[] = [
    {
        key: 'list',
        tabname: '消费列表',
        content: <List />,
    },
    {
        key: 'trends',
        tabname: '消费趋势',
        content: <Trends />,
    },
];
const Merchant: React.FC = () => {
    return <Tabs animated={false} defaultActiveKey="list" dataSource={dataSource} />;
};
export default Merchant;
