방선주 방선주 2023-02-24
230224 방선주 페이징 css 적용
@c57232dc5ee4c6fabbd28bee5a1c47c2492a00ce
client/resources/css/main.css
--- client/resources/css/main.css
+++ client/resources/css/main.css
@@ -1100,4 +1100,11 @@
 
 .mobile{
   display: none;
+}
+
+/* -------------- 페이징 버튼 색상 적용 ----------------- */
+.PagingBtn{
+  background-color: #ff7f50;
+  color: #ffffff;
+
 }
(No newline at end of file)
client/views/component/Pagination.jsx
--- client/views/component/Pagination.jsx
+++ client/views/component/Pagination.jsx
@@ -9,7 +9,7 @@
             <Paging>
                 <button onClick={() => setPage(page - 1)} disabled={page === 1}>&lt;</button>
                 {Array(numPages).fill().map((_, i) => (
-                    <button key={i + 1} onClick={() => setPage(i + 1)} aria-current={page === i + 1 ? "page" : null}> {i + 1} </button>
+                    <button key={i + 1} onClick={() => setPage(i + 1)} aria-current={page === i + 1 ? "page" : null} className={page === i + 1 ? "PagingBtn" : null}> {i + 1} </button>
                 ))}
                 <button onClick={() => setPage(page + 1)} disabled={page === numPages}>&gt;</button>
             </Paging>
@@ -23,4 +23,5 @@
   align-items: center;
   gap: 4px;
   margin: 16px;
-`;
(No newline at end of file)
+`;
+
client/views/pages/user_management/UserAuthoriySelect_agency.jsx
--- client/views/pages/user_management/UserAuthoriySelect_agency.jsx
+++ client/views/pages/user_management/UserAuthoriySelect_agency.jsx
@@ -13,7 +13,7 @@
   
 
   //페이징 작업
-  const limit = 10; // 페이지당 보여줄 공지 개수
+  const limit = 15; // 페이지당 보여줄 공지 개수
   const [page, setPage] = React.useState(1); //page index
   const offset = (page - 1) * limit; //게시물 위치 계산
   const [myUserTotal, setMyUserTotal] = React.useState(0); //최대길이 넣을 변수
@@ -645,7 +645,9 @@
               ))}
           </ul>
           <div>
-            <Pagination total={data.id == 1 ? myUserTotal:userTotal} limit={limit} page={page} setPage={setPage} />
+            {console.log("data.id : ", data)}
+          
+            <Pagination total={data === 1 ? myUserTotal:userTotal} limit={limit} page={page} setPage={setPage} />
           </div>
         </div>
       </div>
Add a comment
List