File tree Expand file tree Collapse file tree 5 files changed +69
-2
lines changed
Expand file tree Collapse file tree 5 files changed +69
-2
lines changed Original file line number Diff line number Diff line change 2929 "json-format-highlight" : " ^1.0.4" ,
3030 "keycloak-js" : " ^26.0.0" ,
3131 "lucide-react" : " ^0.350.0" ,
32+ "oidc-client-ts" : " ^3.1.0" ,
3233 "react" : " ^18.2.0" ,
3334 "react-dom" : " ^18.2.0" ,
35+ "react-oidc-context" : " ^3.2.0" ,
3436 "react-router-dom" : " ^6.22.0" ,
3537 "survey-core" : " latest" ,
3638 "survey-react-ui" : " latest" ,
Original file line number Diff line number Diff line change @@ -87,6 +87,11 @@ export default function TemplateTable({ data }) {
8787 } ,
8888 } ) ;
8989
90+ console . log ( table . getPageCount ( ) ) ;
91+ // console.log(table.getState().pagination.pageIndex);
92+ const pageCount = table . getPageCount ( ) ;
93+ const currentPage = table . getState ( ) . pagination . pageIndex ;
94+
9095 const setIdShosen = useSetIsShosen ( ) ;
9196 useEffect ( ( ) => {
9297 setIdShosen ( data && rowSelection ? data [ rowSelection ] ?. uuid : null ) ;
@@ -164,6 +169,12 @@ export default function TemplateTable({ data }) {
164169 >
165170 Previous
166171 </ button >
172+ < div className = "paginationPageCount" >
173+ < p >
174+ page < span className = "pageCurrent" > { currentPage + 1 } </ span > of{ " " }
175+ < span className = "pageCurrent" > { pageCount } </ span >
176+ </ p >
177+ </ div >
167178 < button
168179 className = "paginBtn"
169180 variant = "outline"
Original file line number Diff line number Diff line change @@ -162,9 +162,26 @@ th {
162162.pagination {
163163 margin-top : 2rem ;
164164 display : flex;
165- align-items : flex-end ;
165+ align-items : center ;
166166 justify-content : flex-end;
167- gap : 12px ;
167+ gap : 18px ;
168+ }
169+
170+ .paginationPageCount {
171+ width : 110px ;
172+ /* color: #777777; */
173+ /* text-transform: uppercase; */
174+ font-size : 14px ;
175+ }
176+ .pageCurrent {
177+ display : inline-block;
178+ background-color : # e3f6ff ;
179+ width : 20px ;
180+ height : 20px ;
181+ padding : 2px ;
182+ border-radius : 50% ;
183+ text-align : center;
184+ font-weight : 700 ;
168185}
169186
170187.paginBtn {
Original file line number Diff line number Diff line change 11import React from "react" ;
22import ReactDOM from "react-dom/client" ;
33import { createBrowserRouter , RouterProvider } from "react-router-dom" ;
4+ import { AuthProvider , useAuth } from "react-oidc-context" ;
45import HomePage from "./pages/HomePage.tsx" ;
56import TemplatePage from "./pages/TemplatePage.tsx" ;
67import WizardPage from "./pages/WizardPage.tsx" ;
You can’t perform that action at this time.
0 commit comments