import React, {Component} from 'react'; import {Row, Col, Icon, Spin} from 'antd'; import './index.css'; import Column from './Column'; import {Query} from "react-apollo"; import gql from "graphql-tag"; import {SHOW_TABLE} from '../../gql' import Schema from "./Schema"; class Table extends Component { render() { let userID = this.props.userID; return ( { ({loading, error, data}) => { if (loading) { return } if (error) { return 'error!'; } return (
{ JSON.parse(data.schema_by_id.schemaData).map(table => ( {table.name} {table.remark} )) }
); } }
) } } export default Table;