design: DataTable 페이지네이션 버튼 스타일 수정(큰 숫자 대응)
This commit is contained in:
@@ -59,7 +59,6 @@ function UsersPage() {
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS],
|
||||
queryFn: () => UserApi.selectUserSttsStats(),
|
||||
});
|
||||
console.log("userSttsStats: ", userSttsStats);
|
||||
|
||||
const { data: users, refetch } = useQuery({
|
||||
queryKey: [ENDPOINT.USER_SERVICE.USERS, pagination, watch("sort")],
|
||||
@@ -127,7 +126,8 @@ function UsersPage() {
|
||||
};
|
||||
|
||||
const getUserSttsStatsCnt = (code: string): number => {
|
||||
return userSttsStats?.find((item) => item.sttsCd === code)?.cnt ?? 0;
|
||||
if (!Array.isArray(userSttsStats)) return 0;
|
||||
return userSttsStats.find((item) => item.sttsCd === code)?.cnt ?? 0;
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"baseUrl": "./src",
|
||||
"paths": {
|
||||
"@/*": ["./*"],
|
||||
"@common/components": ["../../../packages/common/components/dist/"],
|
||||
"@common/components": ["../../../packages/common/components/src/"],
|
||||
"@common/config": ["../../../packages/common/config/dist/"],
|
||||
"@common/network": ["../../../packages/common/network/"]
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ function Pagination<T>({ table }: { table: TableInstance<T> }) {
|
||||
key={pageNumber}
|
||||
variant="ghost"
|
||||
className={cn(
|
||||
"inline-block size-10 !bg-transparent p-0 text-foreground hover:!bg-accent",
|
||||
"inline-block h-10 min-w-10 !bg-transparent p-1 text-foreground hover:!bg-accent",
|
||||
currentPage === pageNumber &&
|
||||
"!bg-primary !font-bold !text-primary-foreground hover:!bg-primary",
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user