diff --git a/src/App.scss b/src/App.scss index d3bff8a..4d95be6 100644 --- a/src/App.scss +++ b/src/App.scss @@ -141,6 +141,8 @@ li { color: black; letter-spacing: normal; border: 1px solid transparent; + + scroll-margin-top: $header-height + $body-vertical-padding; } [data-dev='true'] { diff --git a/src/components/PDFView/PdfMarkItem.tsx b/src/components/PDFView/PdfMarkItem.tsx index d5a7c78..db57800 100644 --- a/src/components/PDFView/PdfMarkItem.tsx +++ b/src/components/PDFView/PdfMarkItem.tsx @@ -2,6 +2,8 @@ import { CurrentUserMark } from '../../types/mark.ts' import styles from '../DrawPDFFields/style.module.scss' import { FONT_SIZE, FONT_TYPE, inPx } from '../../utils/pdf.ts' import { useScale } from '../../hooks/useScale.tsx' +import { forwardRef } from 'react' +import { npubToHex } from '../../utils/nostr.ts' interface PdfMarkItemProps { userMark: CurrentUserMark @@ -14,35 +16,41 @@ interface PdfMarkItemProps { /** * Responsible for display an individual Pdf Mark. */ -const PdfMarkItem = ({ - selectedMark, - handleMarkClick, - selectedMarkValue, - userMark, - pageWidth -}: PdfMarkItemProps) => { - const { location } = userMark.mark - const handleClick = () => handleMarkClick(userMark.mark.id) - const isEdited = () => selectedMark?.mark.id === userMark.mark.id - const getMarkValue = () => - isEdited() ? selectedMarkValue : userMark.currentValue - const { from } = useScale() - return ( -