Files
users/components/dashboard/traffic-source-analysis.tsx
v0 2408d50cb0 refactor: overhaul UI for streamlined user experience
Redesign navigation, home overview, user portrait, and valuation pages
with improved functionality and responsive design.

Co-authored-by: null <4804959+fnvtk@users.noreply.github.com>
2025-07-18 13:47:12 +00:00

37 lines
1.1 KiB
TypeScript

"use client"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
import { BarChart, Bar, XAxis, YAxis, Tooltip, ResponsiveContainer } from "recharts"
export function TrafficSourceAnalysis() {
// 这里应该从API获取实际数据
const data = [
{ source: "微信", value: 4000 },
{ source: "抖音", value: 3000 },
{ source: "小红书", value: 2000 },
{ source: "公众号", value: 2780 },
{ source: "官网", value: 1890 },
{ source: "其他", value: 2390 },
]
return (
<Card>
<CardHeader className="pb-2">
<CardTitle className="text-base font-medium"></CardTitle>
</CardHeader>
<CardContent>
<div className="h-[200px]">
<ResponsiveContainer width="100%" height="100%">
<BarChart data={data}>
<XAxis dataKey="source" />
<YAxis />
<Tooltip />
<Bar dataKey="value" fill="hsl(var(--primary))" />
</BarChart>
</ResponsiveContainer>
</div>
</CardContent>
</Card>
)
}