+ {Array.from({ length: totalPages }, (_, pageIndex) => (
+
handlePageClick(pageIndex)}
+ style={{
+ cursor: 'pointer',
+ borderRadius: '8px',
+ padding: '8px',
+ backgroundColor: selectedPage === pageIndex + 1
+ ? (actualColorScheme === 'dark' ? '#364FC7' : '#e7f5ff')
+ : 'transparent',
+ border: selectedPage === pageIndex + 1
+ ? '2px solid #1c7ed6'
+ : '2px solid transparent',
+ transition: 'all 0.2s ease',
+ display: 'flex',
+ flexDirection: 'column',
+ alignItems: 'center',
+ gap: '8px'
+ }}
+ onMouseEnter={(e) => {
+ if (selectedPage !== pageIndex + 1) {
+ e.currentTarget.style.backgroundColor = actualColorScheme === 'dark' ? '#25262b' : '#f1f3f5';
+ }
+ }}
+ onMouseLeave={(e) => {
+ if (selectedPage !== pageIndex + 1) {
+ e.currentTarget.style.backgroundColor = 'transparent';
+ }
+ }}
+ >
+ {/* Thumbnail Image */}
+ {thumbnails[pageIndex] && thumbnails[pageIndex] !== 'error' ? (
+
+ ) : thumbnails[pageIndex] === 'error' ? (
+
+ Failed
+
+ ) : (
+
+ Loading...
+
+ )}
+
+ {/* Page Number */}
+
+ Page {pageIndex + 1}
+
+
+ ))}
+
+