import React from 'react';
import {WingBlank} from "antd-mobile";
import Document from 'react-document-title'

import Send from './components/Send';
import Receive from './components/Receive';
import Goods from './components/Goods';
import Meeting from './components/Meeting';
import Notice from './components/Notice';

const Work = (props) => {
    const {name} = props.match.params;
    return (
        <Document title="新增">
            <WingBlank>
                {name.indexOf('发文') > -1 && <Send {...props}/>}
                {name.indexOf('收文') > -1 && <Receive {...props}/>}
                {name.indexOf('会议') > -1 && <Meeting {...props}/>}
                {name.indexOf('办公用品') > -1 && <Goods {...props}/>}
                {name.indexOf('通知公告') > -1 && <Notice {...props}/>}
            </WingBlank>
        </Document>
    );
}


export default Work;

