Skip to content

Commit 219ee31

Browse files
committed
remove unused inline pagination concept
1 parent 6d122db commit 219ee31

File tree

3 files changed

+1
-14
lines changed

3 files changed

+1
-14
lines changed

app/components/Pagination.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ import {
1414

1515
const Tunnel = tunnel('pagination')
1616

17-
interface PaginationProps extends UIPaginationProps {
18-
/** If true pagination will be rendered wherever `Pagination.Target` is included */
19-
inline?: boolean
20-
}
21-
export function Pagination({ inline = false, ...props }: PaginationProps) {
22-
if (inline) return <UIPagination {...props} />
23-
17+
export function Pagination(props: UIPaginationProps) {
2418
return (
2519
<Tunnel.In>
2620
<UIPagination className="gutter h-14 py-5" {...props} />

app/table/QueryTable.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ export const useQueryTable = <A extends ApiListMethods, M extends keyof A>(
5353
type QueryTableProps<Item> = {
5454
/** Prints table data in the console when enabled */
5555
debug?: boolean
56-
/** Function that produces a list of actions from a row item */
57-
pagination?: 'inline' | 'page'
5856
pageSize?: number
5957
rowHeight?: 'small' | 'large'
6058
emptyState: React.ReactElement
@@ -71,7 +69,6 @@ const makeQueryTable = <Item extends Record<string, unknown>>(
7169
): ComponentType<QueryTableProps<Item>> =>
7270
function QueryTable({
7371
debug,
74-
pagination = 'page',
7572
pageSize = PAGE_SIZE,
7673
rowHeight = 'small',
7774
emptyState,
@@ -115,7 +112,6 @@ const makeQueryTable = <Item extends Record<string, unknown>>(
115112
<>
116113
<Table table={table} rowHeight={rowHeight} />
117114
<Pagination
118-
inline={pagination === 'inline'}
119115
pageSize={pageSize}
120116
hasNext={tableData.length === pageSize}
121117
hasPrev={hasPrev}

app/ui/lib/Pagination.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const PageInput = ({ number, className }: PageInputProps) => {
2727
}
2828

2929
export interface PaginationProps {
30-
type?: 'inline' | 'page'
3130
pageSize: number
3231
hasNext: boolean
3332
hasPrev: boolean
@@ -37,7 +36,6 @@ export interface PaginationProps {
3736
className?: string
3837
}
3938
export const Pagination = ({
40-
type = 'inline',
4139
pageSize,
4240
hasNext,
4341
hasPrev,
@@ -50,7 +48,6 @@ export const Pagination = ({
5048
<>
5149
<div
5250
className={cn(
53-
type === 'page' && 'py-5',
5451
'flex items-center justify-between text-mono-sm text-default bg-default',
5552
className
5653
)}

0 commit comments

Comments
 (0)