diff --git a/src/components/PDFView/PdfItem.tsx b/src/components/PDFView/PdfItem.tsx index 1a6c6a6..f1dbe87 100644 --- a/src/components/PDFView/PdfItem.tsx +++ b/src/components/PDFView/PdfItem.tsx @@ -36,6 +36,8 @@ const PdfItem = ({ return file.pages?.map((page, i) => { return ( void otherUserMarks: Mark[] @@ -19,6 +21,8 @@ interface PdfPageProps { * Responsible for rendering a single Pdf Page and its Marks */ const PdfPageItem = ({ + fileName, + pageIndex, page, currentUserMarks, handleMarkClick, @@ -38,7 +42,11 @@ const PdfPageItem = ({ return (
- + {`page {currentUserMarks.map((m, i) => (
(markRefs.current[m.id] = el)}> { const [isLoading, setIsLoading] = useState(true) const [loadingSpinnerDesc] = useState('Fetching metadata') + const profileName = + pubkey && + profileMetadata && + truncate( + profileMetadata.display_name || profileMetadata.name || hexToNpub(pubkey), + { + length: 16 + } + ) + useEffect(() => { if (npub) { try { @@ -166,7 +176,10 @@ export const ProfilePage = () => { className={`${styles.banner} ${!profileMetadata || !profileMetadata.banner ? styles.noImage : ''}`} > {profileMetadata && profileMetadata.banner ? ( - + {`banner ) : ( '' )} @@ -186,6 +199,7 @@ export const ProfilePage = () => { {profileName}
@@ -225,14 +239,7 @@ export const ProfilePage = () => { variant="h6" className={styles.bold} > - {truncate( - profileMetadata.display_name || - profileMetadata.name || - hexToNpub(pubkey), - { - length: 16 - } - )} + {profileName} )} diff --git a/src/pages/verify/index.tsx b/src/pages/verify/index.tsx index cf3cf18..8f73d25 100644 --- a/src/pages/verify/index.tsx +++ b/src/pages/verify/index.tsx @@ -106,7 +106,11 @@ const SlimPdfView = ({ }) return (
- + {`page {marks.map((m) => { return (