import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { Row, Col, Tabs } from 'antd';
import { Route, Switch, matchPath } from 'react-router-dom';
import { connect } from 'react-redux';
import './interface.scss'
import InterfaceMenu from './InterfaceList/InterfaceMenu.js'
import InterfaceList from './InterfaceList/InterfaceList.js'
import InterfaceContent from './InterfaceList/InterfaceContent.js'
import InterfaceColMenu from './InterfaceCol/InterfaceColMenu.js'
import InterfaceColContent from './InterfaceCol/InterfaceColContent.js'
import InterfaceCaseContent from './InterfaceCol/InterfaceCaseContent.js'
import { getProject } from '../../../reducer/modules/project';
const contentRouter = {
path: '/project/:id/interface/:action/:actionId',
exact: true
}
const InterfaceRoute = (props) => {
let C;
if (props.match.params.action === 'api') {
if (!props.match.params.actionId) {
C = InterfaceList
} else if (!isNaN(props.match.params.actionId)) {
C = InterfaceContent;
} else if (props.match.params.actionId.indexOf('cat_') === 0) {
C = InterfaceList
}
} else if (props.match.params.action === 'col') {
C = InterfaceColContent;
} else if (props.match.params.action === 'case') {
C = InterfaceCaseContent;
}
return