Skip to content

Commit 28a37be

Browse files
committed
change graphqlTable to graphqlPagination
1 parent ea99b0a commit 28a37be

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

app/[locale]/dashboard/components/GraphqlTable/footer.tsx renamed to app/[locale]/dashboard/components/GraphqlPagination/footer.tsx

File renamed without changes.

app/[locale]/dashboard/components/GraphqlTable/graphqlTable.tsx renamed to app/[locale]/dashboard/components/GraphqlPagination/graphqlPagination.tsx

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,27 @@
11
import React from 'react';
2-
import { DataTable, Text } from 'opub-ui';
32

43
import Footer from './footer';
54

65
interface GraphqlTableProps {
7-
table: {
8-
columns: any[];
9-
rows: any[];
10-
};
116
totalRows: number;
127
pageSize: number;
138
currentPage: number;
149
onPageChange: (newPage: number) => void;
1510
onPageSizeChange: (newSize: number) => void;
11+
children: React.ReactNode;
1612
}
1713

18-
const GraphqlTable: React.FC<GraphqlTableProps> = ({
19-
table,
14+
const GraphqlPagination: React.FC<GraphqlTableProps> = ({
2015
totalRows,
2116
pageSize,
2217
currentPage,
2318
onPageChange,
2419
onPageSizeChange,
20+
children,
2521
}) => {
2622
return (
2723
<div>
28-
<DataTable
29-
columns={table.columns}
30-
rows={table.rows}
31-
hideFooter={true}
32-
hideSelection={true}
33-
defaultRowCount={100}
34-
/>
24+
{children}
3525
<Footer
3626
totalRows={totalRows}
3727
pageSize={pageSize}
@@ -43,4 +33,4 @@ const GraphqlTable: React.FC<GraphqlTableProps> = ({
4333
);
4434
};
4535

46-
export default GraphqlTable;
36+
export default GraphqlPagination;

0 commit comments

Comments
 (0)