initial commit

This commit is contained in:
2026-01-31 22:34:57 +09:00
commit f1301de543
875 changed files with 196598 additions and 0 deletions

81
pages/History.tsx Normal file
View File

@@ -0,0 +1,81 @@
import React from 'react';
import { History, CheckCircle, Clock, XCircle, FileText } from 'lucide-react';
import { TradeOrder } from '../types';
interface HistoryPageProps {
orders: TradeOrder[];
}
const HistoryPage: React.FC<HistoryPageProps> = ({ orders }) => {
return (
<div className="space-y-10 animate-in fade-in duration-500">
<div className="bg-white rounded-[3.5rem] shadow-sm border border-slate-100 overflow-hidden">
<div className="p-8 border-b border-slate-50 flex justify-between items-center bg-slate-50/30">
<h3 className="text-2xl font-black text-slate-800 flex items-center gap-3 uppercase tracking-widest">
<History size={24} className="text-blue-600" />
</h3>
<button className="text-[11px] font-black text-slate-400 hover:text-slate-600 flex items-center gap-2 uppercase tracking-widest">
<FileText size={18} /> (CSV)
</button>
</div>
<div className="overflow-x-auto">
<table className="w-full">
<thead className="bg-slate-50/50">
<tr className="text-left text-[11px] font-black text-slate-400 uppercase tracking-widest border-b">
<th className="px-10 py-6"> 퀀 </th>
<th className="px-10 py-6"></th>
<th className="px-10 py-6"></th>
<th className="px-10 py-6"> </th>
<th className="px-10 py-6"> </th>
<th className="px-10 py-6"> </th>
</tr>
</thead>
<tbody className="divide-y divide-slate-50">
{orders.map(order => (
<tr key={order.id} className="hover:bg-slate-50 transition-colors">
<td className="px-10 py-6 text-sm font-mono text-slate-500">
{order.timestamp.toLocaleString()}
</td>
<td className="px-10 py-6">
<div className="flex flex-col">
<span className="font-black text-slate-800 text-base">{order.stockName}</span>
<span className="text-[11px] font-mono text-slate-400 uppercase tracking-widest">{order.stockCode}</span>
</div>
</td>
<td className="px-10 py-6">
<span className={`px-3 py-1.5 rounded-lg text-[11px] font-black tracking-widest ${order.type === 'BUY' ? 'bg-red-50 text-red-600' : 'bg-blue-50 text-blue-600'}`}>
{order.type === 'BUY' ? '매수' : '매도'}
</span>
</td>
<td className="px-10 py-6 text-base font-black text-slate-700">
{order.quantity} UNIT
</td>
<td className="px-10 py-6 text-base font-mono font-bold text-slate-600">
{order.price.toLocaleString()}
</td>
<td className="px-10 py-6">
<div className="flex items-center gap-2.5">
<CheckCircle size={18} className="text-emerald-500" />
<span className="text-sm font-black text-slate-800 uppercase tracking-tighter"> </span>
</div>
</td>
</tr>
))}
{orders.length === 0 && (
<tr>
<td colSpan={6} className="px-10 py-32 text-center text-slate-400 italic text-base">
.
</td>
</tr>
)}
</tbody>
</table>
</div>
</div>
</div>
);
};
export default HistoryPage;