| import React, { useState, useEffect } from 'react'; |
| import { fetchRecordLog } from '../api/posts_trm'; |
| function TransactionLogs({ userId }) { |
| const [records, setRecords] = useState([]); |
| .then(data => setRecords(data)) |
| .catch(err => console.error('fetchRecordLog error:', err)); |
| <section className="dashboard-logs"> |
| <table className="admin-table"> |
| ? records.map((r, i) => ( |
| <td>{new Date(r.created_at).toLocaleString()}</td> |
| <td colSpan="6" style={{ textAlign: 'center' }}>暂无数据</td> |
| export default TransactionLogs; |