diff --git a/src/views/form/CustomPagination.js b/src/views/form/CustomPagination.js index a741bf4..9554e3c 100644 --- a/src/views/form/CustomPagination.js +++ b/src/views/form/CustomPagination.js @@ -12,33 +12,39 @@ const CustomPagination = ({ totalCount, pageSize }) => { return ( - ({ padding: theme.spacing(1.5, 0) })} - color="primary" - variant="outlined" - shape="rounded" - size="small" - showFirstButton - showLastButton - count={pageCount} - page={page + 1} - boundaryCount={5} - siblingCount={2} - pagesize={10} - onChange={(event, value) => { - apiRef.current.setPage(value - 1); - }} - /> - - - {page * pageSize + 1} / {totalCount} + {pageCount > 1 && ( + ({ padding: theme.spacing(1.5, 0) })} + color="primary" + variant="outlined" + shape="rounded" + size="small" + showFirstButton + showLastButton + count={pageCount} + page={page + 1} + boundaryCount={5} + siblingCount={2} + pagesize={10} + onChange={(event, value) => { + apiRef.current.setPage(value - 1); + }} + /> + )} + {pageCount > 1 && ( + + )} + + {/* 전체 {totalCount} 건 현재페이지 {pageCount > 1 ? `${page * pageSize + 1} / ${totalCount} 건` : `${totalCount}`} */} + {totalCount > 0 ? `전체 ${totalCount} 건 ` : ``} + {pageCount > 1 ? `[ ${page + 1} / ${pageCount} ]` : ``} );