- Created .gitignore to exclude sensitive files and directories. - Added API documentation in API_DOCUMENTATION.md. - Included deployment instructions in DEPLOYMENT.md. - Established project structure documentation in PROJECT_STRUCTURE.md. - Updated README.md with project status and team information. - Added recommendations and status tracking documents. - Introduced testing guidelines in TESTING.md. - Set up CI workflow in .github/workflows/ci.yml. - Created Dockerfile for backend and frontend setups. - Added various service and utility files for backend functionality. - Implemented frontend components and pages for user interface. - Included mobile app structure and services. - Established scripts for deployment across multiple chains.
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
'use client'
|
|
|
|
import { LineChart as RechartsLineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts'
|
|
|
|
interface LineChartProps {
|
|
data: Array<Record<string, any>>
|
|
dataKey: string
|
|
lines: Array<{ key: string; name: string; color?: string }>
|
|
title?: string
|
|
height?: number
|
|
}
|
|
|
|
export function LineChart({ data, dataKey, lines, title, height = 300 }: LineChartProps) {
|
|
return (
|
|
<div>
|
|
{title && <h3 className="text-lg font-semibold mb-4">{title}</h3>}
|
|
<ResponsiveContainer width="100%" height={height}>
|
|
<RechartsLineChart data={data}>
|
|
<CartesianGrid strokeDasharray="3 3" stroke="#e5e7eb" />
|
|
<XAxis dataKey={dataKey} stroke="#6b7280" />
|
|
<YAxis stroke="#6b7280" />
|
|
<Tooltip />
|
|
<Legend />
|
|
{lines.map((line) => (
|
|
<Line
|
|
key={line.key}
|
|
type="monotone"
|
|
dataKey={line.key}
|
|
name={line.name}
|
|
stroke={line.color || '#3b82f6'}
|
|
strokeWidth={2}
|
|
/>
|
|
))}
|
|
</RechartsLineChart>
|
|
</ResponsiveContainer>
|
|
</div>
|
|
)
|
|
}
|
|
|