feat: refactor TopLoader to use a hook for active state management and improve CSS for fixed positioning
CI/CD - ERP Distribution / Build & Deploy Backend (pull_request) Failing after 10m33s
CI/CD - ERP Distribution / Build & Deploy Frontend (pull_request) Failing after 14m21s

This commit is contained in:
Kalana B. Thilakarathna
2026-10-19 23:37:45 +05:30
parent 21b38b5276
commit 28c465f59b
4 changed files with 52 additions and 29 deletions
@@ -30,7 +30,7 @@ import { Input } from '@/components/ui/input'
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
import { toast } from '@/components/ui/toast'
import { TopLoader } from '@/components/shared/top-loader'
import { useTopLoader } from '@/components/shared/top-loader'
import { EmptyState } from '@/components/shared/empty-state'
import { ReceiptDollarIcon } from '@hugeicons/core-free-icons'
@@ -70,11 +70,12 @@ export function SupplierPaymentsClient({ supplierId }: { supplierId: string }) {
useEffect(() => { loadPayments() }, [loadPayments])
useTopLoader(loading)
const pageCount = Math.max(1, Math.ceil(total / pageSize))
return (
<div className="relative">
<TopLoader active={loading} />
<div>
<div className="flex items-center justify-between">
<div>
<h1 className="text-2xl font-semibold text-foreground">Supplier Payments</h1>