The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
cleanup
Kiran K543ea941267c
diff --git a/apps/web/ui/partners/payout-invoice-sheet.tsx b/apps/web/ui/partners/payout-invoice-sheet.tsxindex b7cd7fc8fc..c3cd128eb0 100644--- a/apps/web/ui/partners/payout-invoice-sheet.tsx+++ b/apps/web/ui/partners/payout-invoice-sheet.tsx@@ -57,7 +57,7 @@ const paymentMethodsTypes = Object.freeze({type: "us_bank_account",icon: GreekTemple,fee: DUB_PARTNERS_PAYOUT_FEE_ACH,- duration: "4-5 business days",+ duration: "4 business days",},});@@ -110,17 +110,6 @@ function PayoutInvoiceSheetContent({ setIsOpen }: PayoutInvoiceSheetProps) {[payouts],);- // Automatically select all pending payouts on first load- useEffect(() => {- if (- pendingPayouts &&- pendingPayouts.length > 0 &&- selectedPayouts.length === 0- ) {- setSelectedPayouts(pendingPayouts);- }- }, [pendingPayouts, selectedPayouts]);-// Set the first payment method as the selected payment methoduseEffect(() => {if (!paymentMethods || !paymentMethods.length) {@@ -343,10 +332,6 @@ function PayoutInvoiceSheetContent({ setIsOpen }: PayoutInvoiceSheetProps) {getRowId: (originalRow: PayoutResponse) => originalRow.id,onRowSelectionChange: (rows: Row<PayoutResponse>[]) =>setSelectedPayouts(rows.map((row) => row.original)),- // selectedRows: (selectedPayouts || []).reduce((acc, payout) => {- // acc[payout.id] = true;- // return acc;- // }, {} as RowSelectionState),} as any);return (diff --git a/packages/ui/src/table/table.tsx b/packages/ui/src/table/table.tsxindex 6c94a13e2e..d40e4c3c5c 100644--- a/packages/ui/src/table/table.tsx+++ b/packages/ui/src/table/table.tsx@@ -57,10 +57,9 @@ type UseTableProps<T> = {onRowClick?: (row: Row<T>, e: MouseEvent) => void;// Row selection+ getRowId?: (row: T) => string;onRowSelectionChange?: (rows: Row<T>[]) => void;selectedRows?: RowSelectionState;- getRowId?: (row: T) => string;- defaultSelectedRows?: RowSelectionState;// Table stylesclassName?: string;@@ -100,13 +99,9 @@ export function useTable<T extends any>(props.columnVisibility ?? {},);- const [rowSelection, setRowSelection] = useState<RowSelectionState>({});-- useEffect(() => {- if (props.selectedRows && !deepEqual(props.selectedRows, rowSelection)) {- setRowSelection(props.selectedRows);- }- }, [props.selectedRows, rowSelection]);+ const [rowSelection, setRowSelection] = useState<RowSelectionState>(+ props.selectedRows ?? {},+ );useEffect(() => {props.onRowSelectionChange?.(table.getSelectedRowModel().rows);