CardsPayments() — ui Function Reference
Architecture documentation for the CardsPayments() function in payments.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 1cb449c3_a048_a9d1_6e63_fc0d336184cc["CardsPayments()"] 600361df_95fa_7651_3b98_ddc7abbf5350["payments.tsx"] 1cb449c3_a048_a9d1_6e63_fc0d336184cc -->|defined in| 600361df_95fa_7651_3b98_ddc7abbf5350 style 1cb449c3_a048_a9d1_6e63_fc0d336184cc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/components/cards/payments.tsx lines 172–297
export function CardsPayments() {
const [sorting, setSorting] = React.useState<SortingState>([])
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
[]
)
const [columnVisibility, setColumnVisibility] =
React.useState<VisibilityState>({})
const [rowSelection, setRowSelection] = React.useState({})
const table = useReactTable({
data,
columns,
onSortingChange: setSorting,
onColumnFiltersChange: setColumnFilters,
getCoreRowModel: getCoreRowModel(),
getPaginationRowModel: getPaginationRowModel(),
getSortedRowModel: getSortedRowModel(),
getFilteredRowModel: getFilteredRowModel(),
onColumnVisibilityChange: setColumnVisibility,
onRowSelectionChange: setRowSelection,
state: {
sorting,
columnFilters,
columnVisibility,
rowSelection,
},
})
return (
<Card>
<CardHeader>
<CardTitle className="text-xl">Payments</CardTitle>
<CardDescription>Manage your payments.</CardDescription>
<CardAction>
<Button variant="secondary" size="sm" className="shadow-none">
Add Payment
</Button>
</CardAction>
</CardHeader>
<CardContent className="flex flex-col gap-4">
<div className="overflow-hidden rounded-md border">
<Table>
<TableHeader>
{table.getHeaderGroups().map((headerGroup) => (
<TableRow key={headerGroup.id}>
{headerGroup.headers.map((header) => {
return (
<TableHead
key={header.id}
className="data-[name=actions]:w-10 data-[name=amount]:w-24 data-[name=select]:w-10 data-[name=status]:w-24 [&:has([role=checkbox])]:pl-3"
data-name={header.id}
>
{header.isPlaceholder
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
)}
</TableHead>
)
})}
</TableRow>
))}
</TableHeader>
<TableBody>
{table.getRowModel().rows?.length ? (
table.getRowModel().rows.map((row) => (
<TableRow
key={row.id}
data-state={row.getIsSelected() && "selected"}
>
{row.getVisibleCells().map((cell) => (
<TableCell
key={cell.id}
className="data-[name=actions]:w-10 data-[name=amount]:w-24 data-[name=select]:w-10 data-[name=status]:w-24 [&:has([role=checkbox])]:pl-3"
data-name={cell.column.id}
>
{flexRender(
cell.column.columnDef.cell,
cell.getContext()
)}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does CardsPayments() do?
CardsPayments() is a function in the ui codebase, defined in apps/v4/components/cards/payments.tsx.
Where is CardsPayments() defined?
CardsPayments() is defined in apps/v4/components/cards/payments.tsx at line 172.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free