partner-next/src/app/page.tsx
2025-06-02 13:04:22 +03:00

45 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import mockData from "../data/mockData";
import MetricCards from "../components/MetricCards";
import Table from "../components/Table";
import StatCharts from "../components/StatCharts";
import styles from "../styles/dashboard.module.css";
function formatCurrency(amount: number) {
return amount.toLocaleString("ru-RU", {
style: "currency",
currency: "RUB",
minimumFractionDigits: 0,
});
}
export default function DashboardPage() {
return (
<div className={styles.dashboard}>
<h1 className={styles.title}>Дашборд</h1>
<MetricCards />
<StatCharts />
{/* <div className={styles.tableBlock}>
<h3 className={styles.tableTitle}>Последние продажи</h3>
<Table
headers={["ID реферала", "Агент", "Сумма продажи", "Комиссия", "Дата", "Статус"]}
data={mockData.dashboard.recentSales}
renderRow={(sale: any, index: number) => (
<tr key={index}>
<td>{sale.id}</td>
<td>{sale.agent}</td>
<td>{formatCurrency(sale.amount)}</td>
<td>{formatCurrency(sale.commission)}</td>
<td>{sale.date}</td>
<td>
<span className={sale.status === "Выплачено" ? styles.statusPaid : styles.statusPending}>
{sale.status}
</span>
</td>
</tr>
)}
/>
</div> */}
</div>
);
}