Skip to content

Commit 820a74c

Browse files
committed
Refactor table components and adjust paddings
Code cleanup and small UI/padding tweaks across table-related components. - Reordered/imports and minor formatting fixes in AudioTransactionsTable and Table files. - Added left padding to .tableHeader.leftAlign (.table/Table.module.css) to align header content. - Cleaned up responsiveColumns and Table logic formatting (no behavior changes). - Large formatting/refactor in TracksTable: reflowed MiniTrackArtwork and several cell renderers, standardized destructuring of trackAccessMapRef.current, and forwarded showArtistInTrackNameColumn to the Table props. - Adjusted header paddings in ArtistCoinsTable (Coin and Artist columns), TrackNameWithArtwork.module.css, and WithdrawalsTable.module.css. - Minor import/JSX formatting fixes in PurchasesTable. These changes are primarily stylistic and layout-related, preserving existing behavior while improving readability and consistent spacing.
1 parent 56d77e9 commit 820a74c

9 files changed

Lines changed: 144 additions & 166 deletions

File tree

packages/web/src/components/audio-transactions-table/AudioTransactionsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { Cell, Row } from 'react-table'
1414

1515
import { AudioTransactionIcon } from 'components/audio-transaction-icon'
1616
import { Table } from 'components/table'
17-
import { RESPONSIVE_TABLE_POLICIES } from 'components/table/responsivePolicies'
1817
import { TableProps } from 'components/table/Table'
18+
import { RESPONSIVE_TABLE_POLICIES } from 'components/table/responsivePolicies'
1919

2020
import styles from './AudioTransactionsTable.module.css'
2121

packages/web/src/components/table/Table.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373
.tableHeader.leftAlign .headerContent {
7474
justify-content: flex-start;
75+
padding-left: 12px;
7576
}
7677

7778
.tableHeader.rightAlign .headerContent {

packages/web/src/components/table/Table.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,7 @@ export const Table = ({
196196

197197
const getColumnId = (column: any) => {
198198
if (typeof column?.id === 'string' && column.id.length > 0) return column.id
199-
if (
200-
typeof column?.accessor === 'string' &&
201-
column.accessor.length > 0
202-
) {
199+
if (typeof column?.accessor === 'string' && column.accessor.length > 0) {
203200
return column.accessor
204201
}
205202
return null

packages/web/src/components/table/responsiveColumns.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,11 @@ export const getHiddenResponsiveColumns = ({
8282

8383
if (!activeBreakpoint) return new Set<string>()
8484

85-
return new Set(
86-
activeBreakpoint.hide.filter((id) => !alwaysVisible.has(id))
87-
)
85+
return new Set(activeBreakpoint.hide.filter((id) => !alwaysVisible.has(id)))
8886
}
8987

9088
const hideOrder = responsiveColumns.hideOrder ?? []
91-
if (
92-
!hideOrder.length ||
93-
!isNumber(containerWidth) ||
94-
containerWidth <= 0
95-
) {
89+
if (!hideOrder.length || !isNumber(containerWidth) || containerWidth <= 0) {
9690
return new Set<string>()
9791
}
9892

0 commit comments

Comments
 (0)