import { For } from 'solid-js'; import AdminShell from '~/components/AdminShell'; import { GripVertical } from 'lucide-solid'; const kpis = [ { title: 'Total Users', value: '12,458', delta: '+12.5%', note: '+1,245 this month', tone: 'up' as const, icon: 'users' as const }, { title: 'Active Companies', value: '1,234', delta: '+8.2%', note: '+94 this month', tone: 'up' as const, icon: 'building' as const }, { title: 'Open Leads', value: '847', delta: '-3.1%', note: '27 fewer than last month', tone: 'down' as const, icon: 'trend' as const }, { title: 'Credits Purchased', value: '₹45,890', delta: '+18.7%', note: '₹7,234 more this month', tone: 'up' as const, icon: 'card' as const }, ]; const trendSeries = [62, 70, 81, 75, 88, 102]; const revSeries = [42000, 48000, 55000, 51000, 62000, 69000]; const maxAmount = 80000; function KpiIcon(props: { kind: 'users' | 'building' | 'trend' | 'card' }) { if (props.kind === 'users') { return ( ); } if (props.kind === 'building') { return ( ); } if (props.kind === 'trend') { return ( ); } return ( ); } function DragHandle() { return ( ); } export default function AdminHomePage() { return ( {/* Page header */} Dashboard Overview Welcome back! Here's what's happening with your platform today. {/* KPI cards */} {(item) => ( {item.tone === 'up' ? '↗' : '↘'} {item.delta} {item.title} {item.value} {item.note} )} {/* Chart widgets */} {/* Leads Trend */} Leads Trend Monthly leads performance overview 120 90 60 30 0 {() => } `${i * 20},${40 - v / 3}`).join(' ')} 100,40`} /> `${i * 20},${40 - v / 3}`).join(' ')} /> {(m) => {m}} {/* Revenue Overview */} Revenue Overview Monthly revenue vs expenses comparison 80k 60k 40k 20k 0 {() => } {(value) => ( )} {(m) => {m}} ); }
Welcome back! Here's what's happening with your platform today.
{item.title}
{item.value}
{item.note}
Monthly leads performance overview
Monthly revenue vs expenses comparison