File tree Expand file tree Collapse file tree 1 file changed +12
-25
lines changed
apps/portal/src/components/resumes Expand file tree Collapse file tree 1 file changed +12
-25
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,10 @@ import { useEffect, useState } from 'react';
3
3
import { Document , Page , pdfjs } from 'react-pdf' ;
4
4
import type { PDFDocumentProxy } from 'react-pdf/node_modules/pdfjs-dist' ;
5
5
import {
6
- ArrowLeftIcon ,
7
- ArrowRightIcon ,
8
6
MagnifyingGlassMinusIcon ,
9
7
MagnifyingGlassPlusIcon ,
10
8
} from '@heroicons/react/20/solid' ;
11
- import { Button , Spinner } from '@tih/ui' ;
9
+ import { Button , Pagination , Spinner } from '@tih/ui' ;
12
10
13
11
pdfjs . GlobalWorkerOptions . workerSrc = `//unpkg.com/pdfjs-dist@${ pdfjs . version } /build/pdf.worker.min.js` ;
14
12
@@ -86,28 +84,17 @@ export default function ResumePdf({ url }: Props) {
86
84
</ div >
87
85
</ Document >
88
86
</ div >
89
-
90
- < div className = "flex flex-row items-center justify-between p-4" >
91
- < Button
92
- disabled = { pageNumber === 1 }
93
- icon = { ArrowLeftIcon }
94
- isLabelHidden = { true }
95
- label = "Previous"
96
- variant = "tertiary"
97
- onClick = { ( ) => setPageNumber ( pageNumber - 1 ) }
98
- />
99
- < p className = "text-md text-gray-600" >
100
- Page { pageNumber } of { numPages }
101
- </ p >
102
- < Button
103
- disabled = { pageNumber >= numPages }
104
- icon = { ArrowRightIcon }
105
- isLabelHidden = { true }
106
- label = "Next"
107
- variant = "tertiary"
108
- onClick = { ( ) => setPageNumber ( pageNumber + 1 ) }
109
- />
110
- </ div >
87
+ { numPages > 1 && (
88
+ < div className = "flex justify-center p-4" >
89
+ < Pagination
90
+ current = { pageNumber }
91
+ end = { numPages }
92
+ label = "pagination"
93
+ start = { 1 }
94
+ onSelect = { ( page ) => setPageNumber ( page ) }
95
+ />
96
+ </ div >
97
+ ) }
111
98
</ div >
112
99
) ;
113
100
}
You can’t perform that action at this time.
0 commit comments