import React from 'react' import { Helmet } from 'react-helmet' import { Link } from 'react-router-dom' import { history } from '../../../index' export default function AdminPage(props) { const { data, target } = props const { error } = data const results = data.data const tbKeys = [] if (results.length > 0) { Object.keys(results[0]) .filter(key => key.charAt(0) !== '_') .map(key => tbKeys.push(key)) } const title = target.charAt(0).toUpperCase() + target.slice(1) return (
{error}
) : (
{tbKey} | )}||
---|---|---|
{result[key]} | ) } else if (key === 'img') { return (
| )
}
return {result[key]} | }) }