feat: real data-fetching pages — clients, invoices, payments, tickets, reports with charts

This commit is contained in:
Forge
2026-03-25 08:37:46 +08:00
parent 43a04567bc
commit 142c0d1497
6 changed files with 671 additions and 134 deletions

10
lib/hooks.ts Normal file
View File

@@ -0,0 +1,10 @@
import { useState, useEffect } from 'react';
export function useDebounce<T>(value: T, delay: number): T {
const [debounced, setDebounced] = useState<T>(value);
useEffect(() => {
const t = setTimeout(() => setDebounced(value), delay);
return () => clearTimeout(t);
}, [value, delay]);
return debounced;
}