import React, { useEffect, useState } from 'react';
import { Table, Typography, Spin, Message, Card } from '@arco-design/web-react';
import '@arco-design/web-react/dist/css/arco.css';
import API_BASE_URL from './config';
const columns = [
{
title: 'Timestamp',
dataIndex: 'timestamp',
render: (val) => new Date(val).toLocaleString(),
},
{
title: 'Quantity (MW)',
dataIndex: 'quantity',
render: (val) => val.toFixed(2),
},
{
title: 'Price ($/MWh)',
dataIndex: 'price',
render: (val) => `$${val.toFixed(2)}`,
},
{
title: 'Status',
dataIndex: 'status',
render: (val) => {
let color = 'gray';
if (val === 'Success') color = 'green';
else if (val === 'Fail') color = 'red';
else if (val === 'Submitted') color = 'blue';
return