Update Usage.tsx

This commit is contained in:
alorig
2025-11-09 17:16:58 +05:00
parent e3ff5b9963
commit 30623b8f17

View File

@@ -11,17 +11,16 @@ export default function Usage() {
const [limits, setLimits] = useState<LimitCard[]>([]);
const [loading, setLoading] = useState(true);
const [limitsLoading, setLimitsLoading] = useState(true);
const [currentPage, setCurrentPage] = useState(1);
useEffect(() => {
loadUsage();
loadLimits();
}, [currentPage]);
}, []);
const loadUsage = async () => {
try {
setLoading(true);
const response = await fetchCreditUsage({ page: currentPage });
const response = await fetchCreditUsage({ page: 1 });
setUsageLogs(response.results || []);
} catch (error: any) {
toast.error(`Failed to load usage logs: ${error.message}`);